When I\'m trying to install grunt
via npm
, I\'m getting a following error:
C:\\Program Files\\nodejs\\node_modules\\npm>npm inst
you can run this in cmd
npm config set <key> <value> [-g|--global]
npm config get <key>
npm config delete <key>
npm config list
npm config edit
npm get <key>
npm set <key> <value> [-g|--global]
npmrc.txt will run you can change your link and port
proxy =http://proxy.company.com:8080
https-proxy = http://proxy.company.com:8080
reference
The error occurs because of the configuration set-up in .npmrc file in the
directory C://Users/<username>/
.
Open the .npmrc file in notepad and remove the proxy set up in there. You only need ms build version and ssl set to false as shown in .
This will solve the issue. And now the npm install will work perfectly fine.
run >> npm config edit
after open config file in editor, remove following lines
registry=http://registry.npmjs.org/
https-proxy=http://host/:port
strict-ssl=false
The three thing to make npm working well inside the proxy network .
This set npm registry , By default it may take https.
npm config set registry "http://registry.npmjs.org/"
Second is two set proxy in your system . If your organization use proxy or you.
npm config set proxy "http://username:password@proxy-url:proxy-port"
npm config set https-proxy "http://username:password@proxy-url:proxy-port"
If you're frustrated and none of this monkey-business is working for you, just go Download and run the latest MSI. https://nodejs.org/en/download/
please use npm config set proxy http://xx.aa.bb.cc:port it worked for me thanks a lot !