简体   繁体   English

尝试使用安全帽编译合约但出现错误:- 错误:找不到指定的模块

[英]Tried to compile contract using hardhat but got error:- Error: The specified module could not be found

Error: The specified module could not be found.
\\?\C:\Users\Lenovo\Desktop\Hardhat\node_modules\@nomicfoundation\solidity-analyzer-win32-x64-msvc\solidity-analyzer.win32-x64-msvc.node      
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at Module.require (node:internal/modules/cjs/loader:1028:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Users\Lenovo\Desktop\Hardhat\node_modules\@nomicfoundation\solidity-analyzer\index.js:69:29)
    at Module._compile (node:internal/modules/cjs/loader:1126:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
    at Module.load (node:internal/modules/cjs/loader:1004:32)
    at Function.Module._load (node:internal/modules/cjs/loader:839:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Tried to compile but didnt get any result.It countain the specified modules but throws error.试图编译但没有得到任何结果。它计数指定的模块但抛出错误。

Drag that specified module into that folder where all the other files are kept.将该指定模块拖到保存所有其他文件的文件夹中。 Do the same with other modules till all the files required for the project are not under one folder.对其他模块执行相同操作,直到项目所需的所有文件都不在一个文件夹下。 This might help.这可能会有所帮助。 Thank You.谢谢你。

Here's a workaround to fix the module_not_found compiling issue.这是修复 module_not_found 编译问题的解决方法。 https://github.com/NomicFoundation/hardhat/issues/3176 https://github.com/NomicFoundation/hardhat/issues/3176

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

相关问题 错误:找不到指定的模块 - Error: The specified module could not be found 尝试通过 hardhat 功能编译我的合约时出错 - Error in trying to compile my contract through the hardhat feature 超级账本 Aries 上出现错误“找不到指定的模块” - Error "The specified module could not be found" on hyperledger Aries 在node.js中使用&#39;scrypt&#39;模块时出现&#39;找不到指定的模块&#39;错误 - 'The specified module could not be found' error when using 'scrypt' module in node.js electron-builder 安装程序:主进程出现 JavaScript 错误,错误:找不到指定的模块 - electron-builder installer: A JavaScript error occurred in the main process, Error: The specified module could not be found 通过 Hardhat 将智能合约部署到孟买 tes.net 时出错 - Error while deploying a smart contract to Mumbai testnet through Hardhat npm - 错误:找不到指定的过程 - npm - Error: The specified procedure could not be found 节点 OracleDB 错误:找不到指定的过程 - Node OracleDB Error: The specified procedure could not be found 使用自定义 nodejs 插件时出现“找不到指定的模块” - "The specified module could not be found" when using a custom nodejs addon 安装 hardhat 时出现此错误 -> 找不到模块 '@nomicfoundation/hardhat-toolbox - I'm getting this error while installing hardhat -> Cannot find module '@nomicfoundation/hardhat-toolbox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM