npm install not work

OS windows 7 64bit

when I use npm install gulp,npm does not work.

I am very confused....

Error code:

npm ERR! Error: connect ECONNREFUSED
npm ERR!     at errnoException (net.js:878:11)
npm ERR!     at Object.afterConnect [as oncomplete] (net.js:869: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.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "nodemailer"
npm ERR! cwd C:\Users\yy
npm ERR! node -v v0.10.2
npm ERR! npm -v 1.2.15
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:878:11)
npm ERR! stack     at Object.afterConnect [as oncomplete] (net.js:869:19)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\yy\npm-debug.log
npm ERR! not ok code 0

thanks in advance!


Solution 1:

It looks like you are behind a proxy. To by pass it, you have to configure it like :

npm config set proxy http://myproxyblabla:myport
npm config set https-proxy http://myproxyblabla:myport

Problems with https are solved with :

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