npm i 安装依赖包提示字符串解析异常(Unexpected end of JSON input)

  1. 请确保网络较好,个人因为网络原因折腾了好久,资源库可以设置为https://registry.npm.taobao.org/
  2. 设置和查看命令如下:
    npm config set registry="https://registry.npm.taobao.org/"
    npm config list
  3. 执行:npm cache clean --force
  4. 自此执行安装命令:npm i

npm i 安装依赖包提示字符串解析异常(Unexpected end of JSON input)

猜你喜欢

转载自blog.51cto.com/11127731/2107934