美文网首页
nrm 解决npm ERR! Unexpected end of

nrm 解决npm ERR! Unexpected end of

作者: Alex0825 | 来源:发表于2020-05-07 16:06 被阅读0次

nrm 是一个 能够查看可以切换npm源(仓库)工具

最近遇到了npm 无法下载包的问题,科学上网工具Pac和全局模式都无法解决,所以换个源试一试,结果成功了.

npm ERR! Unexpected end of JSON input while parsing near '...publish_time":1404163'

1. 安装

npm i nrm -g

2. 使用

nrm ls

npm -------- https://registry.npmjs.org/
yarn ------- https://registry.yarnpkg.com/
cnpm ------- http://r.cnpmjs.org/
* taobao ----- https://registry.npm.taobao.org/
nj --------- https://registry.nodejitsu.com/
npmMirror -- https://skimdb.npmjs.com/registry/
edunpm ----- http://registry.enpmjs.org/

nrm use taobao

3. 验证

npm config get registry

https://registry.npm.taobao.org/

PS:这样可以愉快的玩耍了

相关文章

网友评论

      本文标题:nrm 解决npm ERR! Unexpected end of

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