Cannot find module 'hardhat/common/bigInt' #4977
-
I am getting this error after running - yarn hardhat. I am currently starting Hardhat-simple-storage. yarn hardhat deploy
yarn run v1.22.15
warning ../../package.json: No license field
$ /home/nakesh/folder/hardhat-simple-storage-fcc/node_modules/.bin/hardhat deploy
An unexpected error occurred:
Error: Cannot find module 'hardhat/common/bigInt'
Require stack:
- /home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/internal/bigNumber.js
- /home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/internal/hardhatChaiMatchers.js
- /home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/internal/add-chai-matchers.js
- /home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/index.js
- /home/nakesh/node_modules/@nomicfoundation/hardhat-toolbox/dist/src/index.js
- /home/nakesh/hardhat.config.js
- /home/nakesh/folder/hardhat-simple-storage-fcc/node_modules/hardhat/internal/core/config/config-loading.js
- /home/nakesh/folder/hardhat-simple-storage-fcc/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> (/home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/src/internal/bigNumber.ts:2:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157: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: [
'/home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/internal/bigNumber.js',
'/home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/internal/hardhatChaiMatchers.js',
'/home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/internal/add-chai-matchers.js',
'/home/nakesh/node_modules/@nomicfoundation/hardhat-chai-matchers/index.js',
'/home/nakesh/node_modules/@nomicfoundation/hardhat-toolbox/dist/src/index.js',
'/home/nakesh/hardhat.config.js',
'/home/nakesh/folder/hardhat-simple-storage-fcc/node_modules/hardhat/internal/core/config/config-loading.js',
'/home/nakesh/folder/hardhat-simple-storage-fcc/node_modules/hardhat/internal/cli/cli.js'
]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hello @NakeshTewari, maybe this might help: #4072 (reply in thread). I really hope it does, because I have no clue what's the origin of this error. |
Beta Was this translation helpful? Give feedback.
-
@NakeshTewari It happens when you already have a hardhat config file in the folder. Run this command |
Beta Was this translation helpful? Give feedback.
@NakeshTewari It happens when you already have a hardhat config file in the folder. Run this command
npx hardhat --verbose
and see does it shows the file path of the already existing hardhat config file.