alchemyplatform / Contract-Puzzles

20 stars 171 forks source link

npx hardhat test - Command Failed! #8

Open guvent opened 10 months ago

guvent commented 10 months ago

Hi,

I had cloned this project and ran "npx hardhat test" but it says an error like;

Error HH801: Plugin @nomicfoundation/hardhat-toolbox requires the following dependencies to be installed: @nomicfoundation/hardhat-network-helpers, @nomicfoundation/hardhat-chai-matchers, @nomiclabs/hardhat-etherscan, @types/chai, @types/mocha, @typechain/hardhat, hardhat-gas-reporter, solidity-coverage, ts-node, typescript. Please run: npm install --save-dev "@nomicfoundation/hardhat-network-helpers@^1.0.0" "@nomicfoundation/hardhat-chai-matchers@^1.0.0" "@nomiclabs/hardhat-etherscan@^3.0.0" "@types/chai@^4.2.0" "@types/mocha@>=9.1.0" "@typechain/hardhat@^6.1.2" "hardhat-gas-reporter@^1.0.8" "solidity-coverage@^0.8.1" "ts-node@>=8.0.0" "typescript@>=4.5.0"

For more info go to https://hardhat.org/HH801 or run Hardhat with --show-stack-traces

This error has all test scripts;

Why problem caused?

SubhamPaul21 commented 6 months ago

Hello, it seems you have not installed the npm dependencies ( running npm install ) after cloning the project and before running the "npx hardhat test".

If that is the case, take the following steps to work on these project -->

  1. git clone https://github.com/ChainShot/Contract-Puzzles
  2. Inside the new Contract-Puzzles folder, open a terminal and run npm install
  3. Now, you can run npx hardhat test