npm install 运行时报错
npm ERR! Unexpected end of JSON input while parsing near '...{"shasum":"75864225d6'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\songyaofeng\AppData\Roaming\npm-cache\_logs\2017-11-09T02_36_41_924Z-debug.log
解决办法:
使用cnpm,并设置成全聚的环境变量
(1)npm install -g cnpm –registry=https://registry.npm.taobao.org
(2)ng set –global packageManager=cnpm
再次运行ng new router –routing生成新项目就没问题了
本文介绍了一个npm install命令在执行过程中遇到的问题及错误日志。针对该问题,文章提供了具体的解决方案,包括使用cnpm并将其设置为全局环境变量的方法。
1775

被折叠的 条评论
为什么被折叠?



