Sta*_*ley 5 node.js npm npm-install
我注意到在 ubuntu 中安装包时,生成的 package-lock.json 包含少数依赖包指向http://registry.npmjs.org而不是https://registry.npmjs.org,而大多数指向前往https://registry.npmjs.org。
我应该担心那些指向 http 而不是 https 的吗?我应该手动将它们更改为 https 吗?
有一段时间 NPM 注册表本身有一个错误,其中各种包httphttps的tarball 引用包含引用而不是. 一旦在您的缓存中,这些版本将继续与http来源一起列出。
在给定的项目/存储库中运行以下解决了我的问题:
npm cache clean --force
rm -rf node_modules/
git checkout package-lock.json // To undo any https -> http lines if required
npm install
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1167 次 |
| 最近记录: |