【问题标题】:Failed to run assert test while testing contract测试合约时运行断言测试失败
【发布时间】:2021-10-25 19:11:44
【问题描述】:

运行命令 npm run test 时出错

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lottery@1.0.0 test: `mocha`
npm ERR! Exit status 1

npm ERR! Failed at the lottery@1.0.0 test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

我删除了其他测试文件,因为我从以前成功运行的文件夹中复制了这个文件夹。

【问题讨论】:

    标签: node.js ethereum web3


    【解决方案1】:

    请尝试以下:

    npm uninstall solc
    npm install solc@x.y.z   //replace x.y.z as your target version
    

    【讨论】:

      猜你喜欢
      • 2017-04-10
      • 2020-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-08
      • 1970-01-01
      相关资源
      最近更新 更多