[英]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.