Bom dia,
Estou usando Ubuntu 16.04 e tentei instalar o express com o comando mostrado na aula: $ sudo npm install express -save
E recebo o seguinte erro no terminal: https://imgur.com/gallery/MGuVMXI
Até tentei $sudo npm install express --save também, mas o mesmo erro acontece.
Alguma ideia de como resolver? Por que isso acontece?
Aqui vai o log que o erro gerou:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', 'express', '-save' ]
2 info using npm@5.6.0
3 info using node@v8.11.1
4 verbose npm-session d190e444436dc8ec
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for express@latest request to https://registry.npmjs.org/express failed, reason: write EPROTO 140598351165248:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:
8 verbose type system
9 verbose stack FetchError: request to https://registry.npmjs.org/express failed, reason: write EPROTO 140598351165248:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:
9 verbose stack
9 verbose stack at ClientRequest.req.on.err (/usr/lib/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 onerror (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js:106:9)
9 verbose stack at callbackError (/usr/lib/node_modules/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js:126:5)
9 verbose stack at <anonymous>
10 verbose cwd /home/renan/Desktop/KindMEAN
11 verbose Linux 4.13.0-41-generic
12 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "express" "-save"
13 verbose node v8.11.1
14 verbose npm v5.6.0
15 error code EPROTO
16 error errno EPROTO
17 error request to https://registry.npmjs.org/express failed, reason: write EPROTO 140598351165248:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:
18 verbose exit [ 1, true ]
<8-05-11T13_19_23_876Z-debug.log" [readonly] 26L, 1969C 26,1 All