Can anyone break down how to successfully set up a hardhat project on windows? I keep running into the HH12 error: "Error HH12: Trying to use a non-local installation of Hardhat, which is not supported. Please install Hardhat locally using npm or Yarn, and try again."

My understanding is that it is a Windows problem, but I haven't found any comprehensive instructions to solve this error. I've tried all the solutions I found online, but none work.

Any tips? Thanks!


2 Answers 2


Run npm install --save-dev hardhat from within your project, then try running the command you are having an issue with again.


When I run npm install --save-dev hardhat I also get a peer dependency issue. Anyone able to solve the issue?

Conflicting peer dependency: @nomiclabs/hardhat-ethers@2.1.0
npm ERR! node_modules/@nomiclabs/hardhat-ethers
npm ERR!   peer @nomiclabs/hardhat-ethers@"^2.0.0" from @nomiclabs/hardhat-waffle@2.0.3
npm ERR!   node_modules/@nomiclabs/hardhat-waffle
npm ERR!     dev @nomiclabs/hardhat-waffle@"^2.0.3" from the root project
New contributor
Mert Deveci is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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