当我尝试在npm中安装任何模块时,出现以下错误。 我在代理连接后面运行。 我正在使用node.js v8.11.2和npm 5.6.0。
尝试清除npm缓存,但仍然无法正常工作。
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to http://registry.npmjs.org/create_react_app failed,
reason: write EPROTO 101057795:error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:827:
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jack\AppData\Roaming\npm-cache\_logs\2019-03-
20T12_05_22_132Z-debug.log
npm日志
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\8.11.2\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\8.11.2\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli '--https-proxy=https://proxyhost:proxyport',
1 verbose cli 'install',
1 verbose cli 'create_react_app',
1 verbose cli '-g' ]
2 info using npm@5.6.0
3 info using node@v8.11.2
4 verbose npm-session ab4d7bcd2d4daae0
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for create_react_app@latest request to http://registry.npmjs.org/create_react_app failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:827:
8 verbose type system
9 verbose stack FetchError: request to http://registry.npmjs.org/create_react_app failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:827:
9 verbose stack
9 verbose stack at ClientRequest.req.on.err (C:\Program Files\nodejs\8.11.2\node_modules\npm\node_modules\pacote\node_modules\make-fetch-happen\node_modules\node-fetch-npm\src\index.js:68:14)
9 verbose stack at emitOne (events.js:116:13)
9 verbose stack at ClientRequest.emit (events.js:211:7)
9 verbose stack at TLSSocket.socketErrorListener (_http_client.js:387:9)
9 verbose stack at emitOne (events.js:116:13)
9 verbose stack at TLSSocket.emit (events.js:211:7)
9 verbose stack at onwriteError (_stream_writable.js:418:12)
9 verbose stack at onwrite (_stream_writable.js:440:5)
9 verbose stack at _destroy (internal/streams/destroy.js:39:7)
9 verbose stack at TLSSocket.Socket._destroy (net.js:564:3)
9 verbose stack at TLSSocket.destroy (internal/streams/destroy.js:32:8)
9 verbose stack at WriteWrap.afterWrite [as oncomplete] (net.js:866:10)
10 verbose cwd C:\React\jack
11 verbose Windows_NT 6.1.7601
12 verbose argv "C:\\Program Files\\nodejs\\8.11.2\\node.exe" "C:\\Program Files\\nodejs\\8.11.2\\node_modules\\npm\\bin\\npm-cli.js" "--https-proxy=https://proxyhost:proxyport" "install" "create_react_app" "-g"
13 verbose node v8.11.2
14 verbose npm v5.6.0
15 error code EPROTO
16 error errno EPROTO
17 error request to http://registry.npmjs.org/create_react_app failed, reason: write EPROTO 101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:827:
18 verbose exit [ 1, true ]