我注意到在ubuntu安装包时,生成的package-lock.json文件包含少数依赖包指向http://registry.npmjs.org而不是https://registry.npmjs.org,而大多数指向https://registry.npmjs.org。
我应该担心那些指向http而不是https的依赖吗? 我应该手动将它们更改为https吗?
我应该担心那些指向http而不是https的依赖吗? 我应该手动将它们更改为https吗?
有一段时间,NPM注册表本身存在一个错误,即各种软件包的tarball引用包括http
引用而不是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