尝试在Ubuntu服务器上安装Socket.io时发生CERT_UNTRUSTED

时间:2018-07-11 18:57:27

标签: ubuntu npm socket.io

我正在尝试在Ubuntu服务器上安装socket.io。但是我一直收到这个错误。

npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/socket.io
npm ERR! Error: CERT_UNTRUSTED
npm ERR!     at SecurePair.<anonymous> (tls.js:1370:32)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:982:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:469:13)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR!     at doWrite (_stream_writable.js:223:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:213:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:180:11)
npm ERR!     at write (_stream_readable.js:583:24)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.4.0-130-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /home/<USER>/server
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/<USER>/server/npm-debug.log
npm ERR! not ok code 0

我具有最新版本的节点,并且已成功安装该节点,但是我根本无法安装socket.io。

注意:我不是该服务器的管理员,所以我没有'sudo',并且我已经查看过this

npm install -g n也给我同样的错误

0 个答案:

没有答案