Nodejs的npm安装模块时候报错:npm ERR! Error: CERT_UNTRUSTED的解决方法
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm http GET https://registry.npmjs.org/grunt-cli
npm ERR! Error: CERT_UNTRUSTED
npm ERR! at SecurePair.<anonymous> (tls.js:1380:32)
npm ERR! at SecurePair.emit (events.js:92:17)
npm ERR! at SecurePair.maybeInitFinished (tls.js:979:10)
npm ERR! at CleartextStream.read [as _read] (tls.js:471:13)
npm ERR! at CleartextStream.Readable.read (_stream_readable.js:340:10)
npm ERR! at EncryptedStream.write [as _write] (tls.js:368:25)
npm ERR! at doWrite (_stream_writable.js:225:10)
npm ERR! at writeOrBuffer (_stream_writable.js:215:5)
npm ERR! at EncryptedStream.Writable.write (_stream_writable.js:182:11)
npm ERR! at write (_stream_readable.js:601: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 2.6.32-220.13.1.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "grunt-cli"
npm ERR! cwd /usr/local/src/elasticsearch-head-master
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.3.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/local/src/elasticsearch-head-master/npm-debug.log
npm ERR! not ok code 0
解决
npm config set strict-ssl false
接下来继续执行安装命令解决
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
2014-10-11 $.post 和 $.get 设置同步和异步请求