project_web3.0
project_web3.0 copied to clipboard
Cannot find module '@nomicfoundation/hardhat-toolbox'
After installing all the dependencies, when I run npx hardhat test it throws an unexpected error saying
Error: Cannot find module '@nomicfoundation/hardhat-toolbox'
Require stack:
- D:\p60-cryptic\smart_contract\hardhat.config.js
- D:\p60-cryptic\smart_contract\node_modules\hardhat\internal\core\config\config-loading.js
- D:\p60-cryptic\smart_contract\node_modules\hardhat\internal\cli\cli.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (D:\p60-cryptic\smart_contract\hardhat.config.js:1:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'D:\\p60-cryptic\\smart_contract\\hardhat.config.js',
'D:\\p60-cryptic\\smart_contract\\node_modules\\hardhat\\internal\\core\\config\\config-loading.js',
'D:\\p60-cryptic\\smart_contract\\node_modules\\hardhat\\internal\\cli\\cli.js'
]
}
I tried changing the require configurations from @nomicfoundation/hardhat-toolbox to @nomiclabs/hardhat-waffle, and some other changes, yet there's it's still throwing error.
After installing all the dependencies, when I run npx hardhat test it throws an unexpected error saying
Error: Cannot find module '@nomicfoundation/hardhat-toolbox' Require stack: - D:\p60-cryptic\smart_contract\hardhat.config.js - D:\p60-cryptic\smart_contract\node_modules\hardhat\internal\core\config\config-loading.js - D:\p60-cryptic\smart_contract\node_modules\hardhat\internal\cli\cli.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (D:\p60-cryptic\smart_contract\hardhat.config.js:1:1) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) { code: 'MODULE_NOT_FOUND', requireStack: [ 'D:\\p60-cryptic\\smart_contract\\hardhat.config.js', 'D:\\p60-cryptic\\smart_contract\\node_modules\\hardhat\\internal\\core\\config\\config-loading.js', 'D:\\p60-cryptic\\smart_contract\\node_modules\\hardhat\\internal\\cli\\cli.js' ] }
I tried changing the require configurations from @nomicfoundation/hardhat-toolbox to @nomiclabs/hardhat-waffle, and some other changes, yet there's it's still throwing error.
bro just install extra modules after installing it even suggest which extra modules you need to download