When I use the command npx hardhat after successfully creating project via npm and installed hardhat I get such an error An unexpected error occurred: Error: Cannot find module '@nomicfoundation/hardhat-toolbox'

enter image description here

One of the best way to fix such a problem is to use "Starter kit" by chainlink. Here is a link: https://github.com/smartcontractkit/hardhat-starter-kit It's a good way to create your project

But I still want to figure out how to solve this problem!

1 Answer 1


After initializing the hardhat project you need to install the toolbox too. With this command

npm install @nomicfoundation/hardhat-toolbox
  • This is the first thing I tried when solving the problem, but it still doesn't work May 1, 2023 at 21:02
  • I just noticed this. Are you trying this inside an npm project? that is already initiated? Please try npx hardhat in an empty folder. It doesn't initiate inside any folder that is not empty May 2, 2023 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.