博客日记
您现在的位置是:博客主页 > 博客日记

bower 报错 npm ERR! Error: CERT_UNTRUSTED的问题解决

By 钱伯斯 on 博客日记 Time 2020-08-17 from:互联网 453人已围观
简介:    NODEJS安装完,接着安装bower就报错,真的是不折腾不人生呀!在安装前端插件依赖包软件是时报错,提示找不到bower,安装就报错:npm ERR! Error: CERT_UNTRUSTED。

NODEJS安装完,接着安装bower就报错,真的是不折腾不人生呀!在安装前端插件依赖包软件是时报错,提示找不到bower,安装就报错:npm ERR! Error: CERT_UNTRUSTED。

[root@************ fastadmin]# npm install bower -g

npm http GET https://registry.npmjs.org/bower

npm http GET https://registry.npmjs.org/bower

npm http GET https://registry.npmjs.org/bower

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:221:10)

npm ERR!     at writeOrBuffer (_stream_writable.js:211: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 *entire* log,

npm ERR! including the npm and node versions, at:

npm ERR!     <http://github.com/isaacs/npm/issues>

npm ERR! System Linux 3.10.0-1127.18.2.el7.x86_64

npm ERR! command "/usr/local/node/0.10.24/bin/node" "/usr/local/node/0.10.24/bin/npm" "install" "bower" "-g"

npm ERR! cwd /www/wwwroot/yuyue.fxzbcn.com/fastadmin

npm ERR! node -v v0.10.24

npm ERR! npm -v 1.3.21

npm ERR! 

npm ERR! Additional logging details can be found in:

npm ERR!     /www/wwwroot/yuyue.fxzbcn.com/fastadmin/npm-debug.log

npm ERR! not ok code 0

解决办法:

ssl验证问题,使用下面的命令取消ssl验证即可解决
npm config set strict-ssl false


相关文章
文章评论

( 0 )