Reputation: 867
When I am trying to install Express via Node it shows me following error:
D:\NodeJS\express>npm install express
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express
npm ERR! Error: tunneling socket could not be established, cause=getaddrinfo ENOENT
npm ERR! at ClientRequest.onError (C:\Program Files\nodejs\node_modules\npm\node_modules\request\tunnel.js:161:17)
npm ERR! at ClientRequest.g (events.js:192:14)
npm ERR! at ClientRequest.EventEmitter.emit (events.js:96:17)
npm ERR! at CleartextStream.socketErrorListener (http.js:1394:9)
npm ERR! at CleartextStream.EventEmitter.emit (events.js:96:17)
npm ERR! at Socket.onerror (tls.js:1318:17)
npm ERR! at Socket.EventEmitter.emit (events.js:126:20)
npm ERR! at Socket.connect.require.lookup.addressType (net.js:699:16)
npm ERR! at process.startup.processNextTick.process._tickCallback (node.js:244:9)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "express"
npm ERR! cwd D:\NodeJS\express
npm ERR! node -v v0.8.17
npm ERR! npm -v 1.2.0
npm ERR! code ECONNRESET
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\NodeJS\express\npm-debug.log
npm ERR! not ok code 0
D:\NodeJS\express>
I have also tried with -g installation but it not working ! Please help me out here...
Upvotes: 2
Views: 1011
Reputation: 31
For those who setting up Node.js and using npm. I thought that the web proxy settings would be like the rest of the unix world and require me to set the HTTP_PROXY and HTTPS_PROXY environment variables.
Open an command prompt or terminal session and run the following commands to configure npm to work with your web proxy. The commands use proxy.companyname.com as the address and 8080 as the port.
C:>npm config set proxy http://proxy.companyname.com:8080 C:>npm config set https-proxy http://proxy.companyname.com:8080
Upvotes: 1
Reputation: 1030
It looks like npm cannot make a connection to the central repositry. This could be either because of a general connectivity issue on your laptop, but you made it here :) Or it could be because of a mismatch between the Certificate Authorities on your machine and the certificate used by npm.
Make sure you can access https://registry.npmjs.org/express from your browser without any certificate (SSL Security) warnings. If that is not the cause, you should update your Certificate Authorities.
There is a Windows XP update out there for the windows Certificate root.
Upvotes: 1