Loading... > 在装包过程中如果报了这个错误,`Unexpected end of JSON input while parsing near '...noattachment':false ` ,通常是包的缓存出问题了,只要是`while parsing near`就是包的缓存问题 ## 解决方案 1. 一般全局安装的包会存放到`C:\Users\自己的用户名文件夹\AppData\Roaming\npm`这个目录里 2. 安装包的时候,默认会把包的缓存到 `C:\Users\自己的用户名文件夹\AppData\Roaming\npm-cache` 这个目录中 3. 如果以后再 `npm install` 装包的时候报了`while parsing near`这个错误,删除`npm-cache`缓存目录 Last modification:August 29th, 2020 at 06:16 am © 允许规范转载 Support 如果觉得我的文章对你有用,请随意赞赏 ×Close Appreciate the author Sweeping payments Pay by AliPay Pay by WeChat