HardHat Error #380
-
when i go to get the hardhat accounts by doing "yarn hardhat accounts" i run into this ""error error Couldn't find a package.json file in "C:\Program Files\Git"" i even get the issue when i try to run "yarn hardhat", i think maybe i have accdidently changed my file or directory location |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
make you cd into the right directory with your package.JSON. Hardhat is installed locally, so if your starting another project you will have to install it again. The package.JSON contains a list of dependencies required to run your project. |
Beta Was this translation helpful? Give feedback.
-
@armontej I think you are running this command from this location |
Beta Was this translation helpful? Give feedback.
@armontej I think you are running this command from this location
C:\Program Files\Git
make sure to run it inside the project folder and if you still face this issue inside the project folder then runnpm init --yes
it will create this file for you.