Connect ETIMEDOUT module rpm grunt

I cannot install the grunt module.

C:\Users\maah4>npm install -g grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm ERR! network connect ETIMEDOUT
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! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli"
npm ERR! cwd C:\Users\maah4
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! syscall connect
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\maah4\npm-debug.log
npm ERR! not ok code 0

      

I have also tried the following configuration. But it didn't work.

npm config set registry http://registry.npmjs.org/

      

I have a proxy, but I can access this through a browser.

Please let me know how to fix this.

+3


source to share


2 answers


Perhaps you have a firewall in your home / office that is blocking npm.

You can fix this if you install proxy via npm

npm config set proxy http://proxy-server-address:8080
npm config set https-proxy http://proxy-server-address:8080

      



Maybe these links will help you: http://blog.michaelfasani.com/tag/npm/

Sincerely.

+5


source


Try setting the proxy value in an environment variable. HTTP_PROXY

environment variable. Run this on the command line.



  • SETX HTTP_PROXY http://proxy-server-address:8080

    (It should return SUCCESS. You can also do this in the System ... Advanced ... Environment Variables properties)
  • Close the command prompt window and open it again. (This will ensure that your new environment variable is used in your session.)
  • Now run the install command: npm install -g grunt-cli

0


source







All Articles