cnpm install 报错
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Get /binary-mirror-config/latest from https://registry.npm.taobao.org error: ConnectionTimeout Error: Connect timeout for 5000ms, GET https://registry.npmjs.com/binary-mirror-config/latest -2 ( connected: false, keepalive socket: false, agent status: { "createSocketCount":4, "createSocketErrorCount":0, "closeSocketCount":4, "errorSocketCount":0, "timeoutSocketCount":0, "requestCount":0, "freeSockets":{}, "sockets":{},"requests":{} }, socketHandledRequests: 1, socketHandledResponses: 0 ) ……
|
找到报错根源:/nodejs/lib/node_modules/cnpm/node_modules/urllib/lib/urllib.js
修改掉文件里面的常量 TIMEOUT
、TIMEOUTS
的 5s
为 10s