1

I wanted to Hardhat but it's not installing. I first ran "npm init" then I ran the command "npm install --save-dev hardhat" and I kept getting this error message even though I've switched internet network two times:

npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz failed, reanpm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hp\AppData\Local\npm-cache\_logs\2022-09-18T09_05_29_878Z-debug-0.log       
PS C:\Users\hp\Documents\Solidity Projects\Pat\Hardhat-Storage> npm instyarna^C                   
PS C:\Users\hp\Documents\Solidity Projects\Pat\Hardhat-Storage> npm install --save-dev hardhat    
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/secp256k1/-/secp256k1-4.0.3.tgz failed, reason: getaddrinfo ENOTFOUND your-proxy-url
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hp\AppData\Local\npm-cache\_logs\2022-09-18T13_39_16_901Z-debug-0.log
Ololade
  • 99
  • 7

1 Answers1

0

I used Windows PowerShell in Administrator mode and ran the installation codes.

npm init 

npm install --save-dev hardhat