npm ERR! `Error: connect ECONNREFUSED`
npm ERR! `at errnoException (net.js:904:11)`
npm ERR! `at Object.afterConnect [as oncomplete] (net.js:895: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 install -g yo
时,我都会收到上面列出的错误。我不确定接下来该做什么。
答案 0 :(得分:0)
只需要设置
npm config set proxy http://usr:pwd@proxyname:port
npm config set https-proxy http://usr:pwd@proxyname:port