简体   繁体   中英

Unable install Gulp using npm in Windows

I am trying to install Gulp using npm in Windows 8 using following command in Command Prompt:

npm install gulp -g

And I am getting following error in the command prompt

C:\windows\system32>npm install gulp -g
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "gulp" "-g"
npm ERR! node v5.10.0
npm ERR! npm  v3.8.3
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! syscall getaddrinfo

npm ERR! getaddrinfo EAI_AGAIN registry.npmjs.org:443
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\windows\system32\npm-debug.log

I have set the nodeJs executable file path in the PATH environmental variable. What am I missing here?

I think you have a proxy issue too. Try doing this:

npm config set proxy http://<USERNAME>:<PASSWORD>@<SERVER>:<PORT>
npm config set https-proxy http://<USERNAME>:<PASSWORD>@<SERVER>:<PORT>

Change the values surrounded with <> with your proxy data (if you don't use a username to login just delete that part) and try it.

看起来像代理问题,尝试将其放在您的cmd中:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM