truffle 编译 正在编译您的契约(Contract)... Compiling .\src\contracts\M-6ren">
gpt4 book ai didi

javascript - 我尝试在松露中部署我的智能合约,但是当我 "unsupported compiler"时说 "truffle migrate"我该如何解决这个问题?

转载 作者:行者123 更新时间:2023-12-05 00:52:44 26 4
gpt4 key购买 nike

PS D:\Projects\ANIS\Decentralized_Bank> truffle 编译

正在编译您的契约(Contract)...

Compiling .\src\contracts\Migrations.solCompiling .\src\contracts\Migrations.solCompiling .\src\contracts\Tether.sol
Compiling .\src\contracts\Tether.sol
Artifacts written to D:\Projects\ANIS\Decentralized_Bank\src\truffle_abisCompiled successfully using:

  • solc:0.5.16+commit.9c3226ce.Emscripten.clang

PS D:\Projects\ANIS\Decentralized_Bank> [松露迁移]

正在编译您的契约(Contract)...

错误:不支持的编译器:[object Object]

at C:\Users\OMEN\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\workflow-compile\index.js:28:1
at Array.map (<anonymous>)
at compile (C:\Users\OMEN\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\workflow-compile\index.js:26:1)
at Object.compile (C:\Users\OMEN\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\workflow-compile\index.js:68:47)
at Object.compileAndSave (C:\Users\OMEN\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\workflow-compile\index.js:95:47)
at Object.run (C:\Users\OMEN\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\commands\migrate.js:199:1)
at Command.run (C:\Users\OMEN\AppData\Roaming\npm\node_modules\truffle\build\webpack:\packages\core\lib\command.js:183:1)

Truffle v5.4.11(核心:5.4.11)节点 v14.17.2

最佳答案

我的错误发生这个错误是因为我在 truffle-config.js 文件中错误地输入了“compiler”而不是“compilers”

正确的代码

编译器:{ Solr 克:{版本:'^0.5.0',优化器:{启用:真,运行:200}}}

关于javascript - 我尝试在松露中部署我的智能合约,但是当我 "unsupported compiler"时说 "truffle migrate"我该如何解决这个问题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69336123/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com