windows10下vue3.0.5安装依赖出错
来源:3-3 项目依赖包下载
慕丝Jack
2018-11-01
执行命令cnpm i --save-dev node-sass sass-loader出现错误,
错误如下:
D:\Users\wangyanjun\webstorm-workspace\birdhelper\vue-imooc-ebook>cnpm i --save-dev node-sass sass-loader
- [1/2] Installing nan@^2.10.0content buffer: {“type”:“Buffer”,“data”:[]}
× Install fail! SyntaxError: Unexpected end of JSON input (file: D:\Users\wangyanjun\webstorm-workspace\birdhelper\vue-imooc-ebook\node_modules_inherits
@2.0.3@inherits\package.json)
SyntaxError: Unexpected end of JSON input (file: D:\Users\wangyanjun\webstorm-workspace\birdhelper\vue-imooc-ebook\node_modules_inherits@2.0.3@inherits\p
ackage.json)
at JSON.parse ()
at Object.readJSON (D:\Users\Administrator\AppData\Roaming\nvm\v11.0.0\node_modules\cnpm\node_modules\npminstall\lib\utils.js:33:17)
at readJSON.next ()
at onFulfilled (D:\Users\Administrator\AppData\Roaming\nvm\v11.0.0\node_modules\cnpm\node_modules\co\index.js:65:19)
npminstall version: 3.14.0
npminstall args: D:\Users\Administrator\AppData\Roaming\nodejs\node.exe D:\Users\Administrator\AppData\Roaming\nvm\v11.0.0\node_modules\cnpm\node_modules
npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\wangyanjun.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=htt
ps://registry.npm.taobao.org --save-dev node-sass sass-loader
希望能解答下,困扰了很久了。谢谢
写回答
1回答
-
你好,建议把node_modules目录删除后,重新使用cnpm install安装一下依赖
012018-11-01
相似问题