我注意到在ubuntu中安装软件包时,生成的package-lock.json包含一些指向 http://registry.npmjs.org而不是 https://registry.npmjs.org的依赖包,而大多数指向 https://registry.npmjs.org. 我应该关注那些指向http而
我应该关注那些指向http而不是https的人吗?我应该手动将它们更改为https吗?
有一段时间,NPM注册表本身有一个 tarball reference for various packages includedhttp
references rather than https
的错误.一旦进入你的缓存,这些版本将继续与http源列出.
在给定项目/存储库中运行以下内容解决了我的问题:
npm cache clean --force rm -rf node_modules/ git checkout package-lock.json // To undo any https -> http lines if required npm install