node.js - ERR! network. Cannot install the latest version of npm, yeoman, bower and grunt -
i've problem installation yeoman, bower, grunt , latest npm version.
the latest version of nodejs (0.12.2) installed on pc. have npm version 2.7.4 when start git bash in nodejs folder , type "npm install npm" or "npm install npm@latest" gives error message:
error windows_nt 6.1.7601 error argv "c:\\program files\\nodejs\\node.exe" "c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "npm@latest" error node v0.12.2 error npm v2.7.4 error code etimedout error errno etimedout error syscall connect error network connect etimedout error network not problem npm error network , related network connectivity. error network in cases behind proxy or have bad network settings. error network error network if behind proxy, please make sure error network 'proxy' config set properly. see: 'npm config' verbose exit [ 1, true ]
and complete debug log:
0 info worked if ends ok 1 verbose cli [ 'c:\\program files\\nodejs\\node.exe', 1 verbose cli 'c:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'install', 1 verbose cli 'npm@latest' ] 2 info using npm@2.7.4 3 info using node@v0.12.2 4 warn package.json nodejs@0.12.2 no description 5 warn package.json nodejs@0.12.2 no repository field. 6 warn package.json nodejs@0.12.2 no readme data 7 silly cache add args [ 'npm@latest', null ] 8 verbose cache add spec npm@latest 9 silly cache add parsed spec { raw: 'npm@latest', 9 silly cache add scope: null, 9 silly cache add name: 'npm', 9 silly cache add rawspec: 'latest', 9 silly cache add spec: 'latest', 9 silly cache add type: 'tag' } 10 verbose addnamed npm@latest 11 silly addnamed semver.valid null 12 silly addnamed semver.validrange null 13 info addnametag [ 'npm', 'latest' ] 14 silly maptoregistry name npm 15 silly maptoregistry using default registry 16 silly maptoregistry registry https://registry.npmjs.org/ 17 silly maptoregistry uri https://registry.npmjs.org/npm 18 verbose addnametag registry:https://registry.npmjs.org/npm not in flight; fetching 19 verbose request uri https://registry.npmjs.org/npm 20 verbose request no auth needed 21 info attempt registry request try #1 @ 09:30:04 22 verbose request id 6fa6dc64e92e52cc 23 http request https://registry.npmjs.org/npm 24 info retry retry, error on last attempt: error: connect etimedout 25 info attempt registry request try #2 @ 09:30:35 26 http request https://registry.npmjs.org/npm 27 info retry retry, error on last attempt: error: connect etimedout 28 info attempt registry request try #3 @ 09:31:56 29 http request https://registry.npmjs.org/npm 30 verbose stack error: connect etimedout 30 verbose stack @ exports._errnoexception (util.js:746:11) 30 verbose stack @ tcpconnectwrap.afterconnect [as oncomplete] (net.js:1000:19) 31 verbose cwd c:\program files\nodejs
i've read threads problems of nodejs , found ability set http proxy. solution?
i've solved problem. find out proxy-server name on windows 7 i've opened command line of windows , type: netsh winhttp show proxy
then added these lines in .npmrc data (path:c:\users\username)
registry=http://registry.npmjs.org/ strict-ssl=false proxy=http://username:password@proxy.domain.com:8080/ https-proxy=http://username:password@proxy.domain.com:8080
it works fine :)
Comments
Post a Comment