🌟🌌 欢迎来到知识与创意的殿堂 — 远见阁小民的世界!🚀
🌟🧭 在这里,我们一起探索技术的奥秘,一起在知识的海洋中遨游。
🌟🧭 在这里,每个错误都是成长的阶梯,每条建议都是前进的动力。
🌟🧭 在这里,我们一起成长,一起进步,让我们在知识的世界里畅游无阻,共同创造一个充满智慧和创新的明天。
🌟📚 点击关注,加入我们的技术探索之旅吧!❤️📖✨
✨博客主页:远见阁小民的主页
📕本文专栏:问题专栏
📕其他专栏:后端专栏 AI专栏 Python专栏 其他专栏 白帽学徒笔记
Linux专栏
问题1:描述
npm i 或 npm install 卡住不动弹👇
[..................] - idealTree:vue: sill idealTree buildDeps
问题1:解决方法
更换镜像源👇
通过指定 --registry 参数来使用淘宝 NPM 镜像源
npm install --registry=https://registry.npmmirror.com
如果你想将这个镜像源设置为默认的 npm 源,可以使用以下命令
npm config set registry https://registry.npmmirror.com
问题2:描述
npm i 或 npm install 过程中报错👇
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/eslint failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in: C:\Users\18043\AppData\Local\npm-cache\_logs\2024-06-11T07_39_45_298Z-debug-0.log
问题2:解决方法
将 npm 的配置项 strict-ssl 设置为 false;
即在进行 HTTPS 请求时不强制验证 SSL 证书的有效性。
这样做可以绕过由于证书过期或无效导致的错误,允许 npm 继续下载和安装包。
将 npm 的配置项 strict-ssl 设置为 false
npm config set strict-ssl false
npm install完成后建议恢复设置,将 strict-ssl 重新设置为 true 以确保安全性
npm config set strict-ssl true