OS windows 7 64bit

When I enter the npm install gulp , npm does not perform the installation.

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 

association: https://stackoverflow.com/questions/24244684/npm-install-not-work

    1 answer 1

    Looks like your network is behind a proxy server. To transfer data through it, you need to configure npm with the following commands via cmd :

     npm config set proxy http://username:password@yourproxyserver:port npm config set https-proxy http://username:password@yourproxyserver:port npm config set registry http://registry.npmjs.org/ npm set strict-ssl false 

    Or create a .npmrc file at c:\@username-path@\.npmrc with the contents:

     proxy=http://username:password@yourproxyserver:port/ https-proxy=http://username:password@yourproxyserver:port/ registry=http://registry.npmjs.org/ strict-ssl=false 
    • Is it possible not to shine the login and password in the config file, but to use the session of the current user? - B. Vandyshev
    • @ B.Vandyshev afraid not. At least, this method is unknown to me. - Sasha Omelchenko
    • This is bad, it turns out you need to change it in the config every time you change the password - B. Vandyshev