繁体   English   中英

无法编译或运行安全帽

[英]cannot get hardhat to compile or run

我一直在绞尽脑汁让安全帽在我的机器上工作。 经过一些 hacky 的努力后,我设法将我的 npm 升级到 8.7.0,将我的 nodejs 升级到 16.14.2 eventho 我正在使用 windows 7。开始时并不理想,但我真的不想升级到 win10,除非没有其他编译/部署方式。

我正在使用 VSC 的终端放置“npx hardhat compile”。 我得到以下编译错误:

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'
}

solc(solidity 编译器)与您的操作系统不兼容,这与安全帽无关。 如果你想处理智能合约,我强烈建议你将你的操作系统升级到 MacOS/Linux。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM