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

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-19T06_06_48_199Z-debug-0.log

1 Answer 1


Try to run your terminal/power shell as administrator privileges. it will solve the error , also make sure better internet connection

Your Answer

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

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