问题描述:
vue安装依赖时报error:
Unexpected end of JSON input while parsing near …
需要清除缓存, 并重新安装依赖
打开命令窗口,在命令窗口中依次敲出三条命令:
- npm install --registry=https://registry.npm.taobao.org --loglevel=silly
- npm cache clean --force
- npm install
还有一种方法:
- npm cache clean --force (单独一条, 然后重新安装依赖)