美文网首页
npm install 500 Internal Server

npm install 500 Internal Server

作者: 嘛尼嘛哄 | 来源:发表于2020-01-08 17:41 被阅读0次

bug 记录

npm ERR! code E500
npm ERR! 500 Internal Server Error - GET http://42.159.157.231/jest-changed-files/-/jest-changed-files-24.9.0.tgz

项目引用了多个不同的registry的 npm包导致, 由于npm只能设置一个registry。所以不能同时从其它的registry上获取npm包。
因此需要对其它的npm包设置他们的scope, 实际开发中如果涉及到2个以上的npm npm registry则需要使用scope进行区分。

设置如下:

npm config set @scope:registry   [registry url]

设置完成后可以功过npm config ls查看

@myscope:registry = "http://42.159.157.238/"
home = "https://www.npmjs.org"
registry = "https://registry.npmjs.org/"

相关文章

网友评论

      本文标题:npm install 500 Internal Server

      本文链接:https://www.haomeiwen.com/subject/gomsactx.html