我注意到,在ubuntu中安装软件包时,生成的package-lock.json包含少数指向http://registry.npmjs.org而不是https://registry.npmjs.org的依赖软件包,而其中大多数指向{{3} }。
我应该担心那些指向http而不是https的人吗?我应该手动将它们更改为https吗?
答案 0 :(得分:1)
有一段时间,NPM注册表本身存在一个tarball reference for various packages included http
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