如何解决Yarn - 错误:检索二进制文件时出错:未找到 - Solidity 项目
所以我试图了解测试如何与 Solidity 合约配合使用。因此,我在本地克隆了 Uniswapv2 的核心存储库,安装了所有纱线依赖项,并尝试运行“纱线编译”,正如其 README 中所述。
当我这样做时会发生这种情况:
PS C:\Users\Laptop\crypto\uniswap_test\uniswap-v2-core> yarn compile
Error: Error retrieving binary: Not Found
at ClientRequest.<anonymous> (C:\Users\Laptop\crypto\uniswap_test\uniswap-v2-core\.yarn\cache\solc-npm-0.6.6-caef95cd78-47111f86f8.zip\node_modules\solc\wrapper.js:334:14)
at Object.onceWrapper (node:events:485:26)
at ClientRequest.emit (node:events:378:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:636:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
at TLSSocket.socketOnData (node:_http_client:502:22)
at TLSSocket.emit (node:events:378:20)
at addChunk (node:internal/streams/readable:313:12)
at readableAddChunk (node:internal/streams/readable:288:9)
at TLSSocket.Readable.push (node:internal/streams/readable:227:10)
之后,我用 yarn add waffle
安装了 Waffle,然后在编译时产生了以下内容:
PS C:\Users\Laptop\crypto\uniswap_test\uniswap-v2-core> yarn compile
node:events:355
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory,open 'C:\Users\Laptop\crypto\uniswap_test\uniswap-v2-core\cache\solcjs\node_modules\solc.js'
Emitted 'error' event on WriteStream instance at:
at emitErrorNT (node:internal/streams/destroy:188:8)
at emitErrorCloseNT (node:internal/streams/destroy:153:3)
at processTicksAndRejections (node:internal/process/task_queues:81:21) {
errno: -4058,code: 'ENOENT',syscall: 'open',path: 'C:\\Users\\Laptop\\crypto\\uniswap_test\\uniswap-v2-core\\cache\\solcjs\\node_modules\\solc.js'
}
但是在附加的屏幕截图中可以看到该文件夹中没有任何内容:
有人知道从这里去哪里吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。