When upgrading npm to latest version or installing grunt using command prompt, I'm getting the following exception.
C:\Users\username>npm install npm@latest
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "npm@latest"
npm ERR! node v4.4.5
npm ERR! npm v2.15.5
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect
npm ERR! network connect ETIMEDOUT 103.245.222.162:443
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settin
gs.
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! Please include the following file with any support request:
npm ERR! D:\Users\username\npm-debug.log
I tried the following commands to install latest version of npm
npm install npm@latest
And for installing grunt
npm install -g grunt-cli
For both, I'm getting the above error. Can someone help me to resolve this issue.
Update:
I tried the following. I have configured the proxy address and then tried to install grunt.
For HTTP:
npm config set proxy http://proxy_host:port
For HTTPS:
npm config set https-proxy http://proxy.company.com:8080
But, it still showing the same error.