为了让我的机器工作,我一直在绞尽脑汁。经过一些艰苦的努力,我成功地将我的npm升级到8.7.0,我的nodejs升级到16.14.2甚至,我使用的是windows 7,这并不理想,但我真的不想升级到win10,除非没有其他方式编译/部署。
我正在使用VSC的终端,把"npx硬帽子编译“。我得到以下编译错误:
Internal exception in StandardCompiler::compile: C:\Users\circleci\project\libsolidity\ast\AST.cpp(183): Throw in function class std::vector<class solidity::frontend::ErrorDefinition const *,class std::allocator<class solidity::frontend::ErrorDefinition const *> > __cdecl solidity::frontend::ContractDefinition::interfaceErrors(bool) const
Dynamic exception type: struct boost::wrapexcept<struct solidity::langutil::InternalCompilerError>
std::exception::what:
[struct solidity::util::tag_comment * __ptr64] =
An unexpected error occurred:
Error: Command failed: C:\Users\Rnsn\AppData\Local\hardhat-nodejs\Cache\compilers\windows-amd64\solc-windows-amd64-v0.8.4+commit.c7e474f2.exe --standard-json
at ChildProcess.exithandler (node:child_process:399:12)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
killed: false,
code: 3221225477,
signal: null,
cmd: 'C:\\Users\\Rnsn\\AppData\\Local\\hardhat-nodejs\\Cache\\compilers\\windows-amd64\\solc-windows-amd64-v0.8.4+commit.c7e474f2.exe --standard-json'
}发布于 2022-04-21 10:20:45
solc (solidity编译器)与您的操作系统不兼容,它不是关于硬帽子的。我强烈建议您将操作系统升级到MacOS/Linux,如果您想使用智能合同的话。
https://stackoverflow.com/questions/71902018
复制相似问题