vue mac项目拷贝windows 安装遇到问题

问题

    • npm 安装速度慢,使用cnpm
    • npm install 时报错:
      • no such file or directory
      • Unexpected end of JSON input while parsing near

npm 安装速度慢,使用cnpm

//安装cnpm
npm install cnpm -g --registry=https://registry.npm.taobao.org
//安装后查看
cnpm -v

npm install 时报错:

no such file or directory

npm WARN tar ENOENT: no such file or directory, open '*\node_modules.staging*

删除 package-lock.json, 后重新执行npm install

Unexpected end of JSON input while parsing near

Unexpected end of JSON input while parsing near ‘…},"_hasShrinkwrap":fa
清除缓存

npm cache clean --force

你可能感兴趣的:(vue,npm,vue)