Install fail! SyntaxError: Unexpected end of JSON input

730 阅读1分钟

害,回家加班初始化项目cnpm i 却出现这种错误:

Install fail! SyntaxError: Unexpected end of JSON input (file:xxxx\node_modules_is-fullwidth-code-point@2.0.0@is-fullwidth-code-point\package.json)

一顿百度之后

cnpm cache clean --force

清理一下缓存,然后删除你的node_modules

再执行下cnpm i就OK了,记录下