git克隆项目安装依赖报错

报错:

Unexpected end of JSON input (file: C:UsersAdministratorDesktop....报错

不要惊慌,让我们重新安装一下就好了。

1.首先

执行一下命令清理缓存:cnpm cache clean --force

2.其次

当出现如下提示说明你清理成功了

输入运行之后再次安装淘宝镜像即可成功

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

3.然后

删除已经安装的node_modules,然后重新:cnpm install

OK,完成!

.

原文地址:https://www.cnblogs.com/fightjianxian/p/13589997.html