初學nodejs安裝cnpm一直報錯node
npm ERR! network tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:8080npm
npm ERR! network This is most likely not a problem with npm itselfsocket
npm ERR! network and is related to network connectivity.debug
npm ERR! network In most cases you are behind a proxy or have bad network settings.ip
npm ERR! network it
npm ERR! network If you are behind a proxy, please make sure that theevent
npm ERR! network 'proxy' config is set properly. See: 'npm help config'ejs
npm ERR! Please include the following file with any support request:file
npm ERR! /Users/jikuandai/Desktop/demo/npm-debug.lognetwork
at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)
解決方案:
npm config rm proxy
npm config rm https-proxy