I am trying to create a new hardhat project. Hardhat gives me some pre-created sol files and some scripts. I am just trying to compile this pre-created project but an error occured.
\\?\C:\Users\myuser\Desktop\SolidityProjects\emptyhardhatfinal\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 require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (C:\Users\myuser\Desktop\SolidityProjects\emptyhardhatfinal\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'
}
1- npm init -y
2- npm i --dev hardhat
3- npx hardhat and create a java script project
4- npm i --dev @nomicfoundation/hardhat-toolbox
5- npx hardhat compile the error above occured.
My node version is v16.17.0
User variables for my.user = C:\Users\myuser\AppData\Roaming\npm
System variables = C:\Program Files\nodejs\
I realized that "AppData\Roaming\npm" folder is empty. But inside another pc that this project worked well is not empty; there is a "node_modules" folder.
What is the problem and how can i solve this