Phonegap installation issue via cmd nodejs [windows 7]
Im trying to install phonegap using the cmd "npm install -g phonegap"
but its not installing and giving me installation failed message ive pasted the cmd message below
so how do i set the proxy settings(assuming thats the issue) which nodejs can use to connect to the internet and complete the installation of phonegap
my system config is windows 7 64bit
C:Windowssystem32>npm install -g phonegap
npm http GET https://registry.npmjs.org/phonegap
npm ERR! Error: connect ECONNREFUSED
npm ERR! at errnoException (net.js:901:11)
npm ERR! at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR! { [Error: connect ECONNREFUSED]
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect' }
npm ERR!
npm ERR! If you are behind a proxy, please make sure that the
npm ERR! 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:Program Filesnodejsnode.exe" "C:Program Filesnod
ejsnode_modulesnpmbinnpm-cli.js" "install" "-g" "phonegap"
npm ERR! cwd C:Windowssystem32
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! syscall connect
npm ERR! code ECONNREFUSED
npm ERR! errno ECONNREFUSED
npm ERR! stack Error: connect ECONNREFUSED
npm ERR! stack at errnoException (net.js:901:11)
npm ERR! stack at Object.afterConnect [as oncomplete] (net.js:892:19)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:Windowssystem32npm-debug.log
npm ERR! not ok code 0
Solved it
Just had to set
npm config set proxy http://usr:pwd@proxyname:port
npm config set https-proxy http://usr:pwd@proxyname:port
npm config set registry http://registry.npmjs.org/
链接地址: http://www.djcxy.com/p/87240.html
上一篇: Node.js错误:连接ECONN拒绝