2015-01-15 1 views
0
$ npm install -g bower 
npm ERR! network getaddrinfo ENOTFOUND 
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 Files 
(x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "bower" 
npm ERR! cwd d:\Cpy Work\Yohaat Work\YOHAAT 
npm ERR! node -v v0.10.33 
npm ERR! npm -v 1.4.28 
npm ERR! syscall getaddrinfo 
npm ERR! code ENOTFOUND 
npm ERR! errno ENOTFOUND 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  d:\Cpy Work\Yohaat Work\YOHAAT\npm-debug.log 
npm ERR! not ok code 0 

답변

0

여기에는 두 가지 문제가 있습니다.

먼저 프록시를 사용 중일 수 있습니다. 그것은 npm가 오류 메시지에서 위의 것을 말하려는 것입니다.

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 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'

는이 PowerShell 명령을 사용할 수 있습니다 설정 프록시를 확인하는 방법은 다음과 같습니다

Windows-R to open the "Run" window Type powershell and click OK Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" -Name ProxyServer .... ProxyServer : host:port

당신은 프록시 서버가 아래에 표시가 나타납니다. 당신이 다른 문제가있을 경우 선두 http://

npm config set http_proxy "http://host:port"

npm 구성이 설정, 요지 http://gist.github.com로 NPM-debug.log를 업로드하세요? 가능한 경우 적어도 하나의 -d 플래그가있는 npm을 실행하여 로깅 수준을 높입니다.

npm에 대한 많은 개선 사항이있었습니다. 특히 1.4.28부터 설치 중 충돌 및 경쟁 조건이있었습니다. npm 설치를 업데이트해볼 수 있습니까?

는 NPM을 업데이트 npm -g install [email protected]

Windows에서 NPM을 업데이트하려면 실행, 여기 지침을 따르십시오 : https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows

감사합니다!

+0

감사합니다 ..... –