vue npm报错

搭建vue环境时在npm install的时候出现C:\Users\叶子\AppData\Roaming\npm-cache\_logs\2018-07-25T08_10_51_673Z-debug.log报错

一、问题产生

 

 

        我们使用命令 npm install xxx安装包时,默认是从 npm 的的镜像源服务器进行下载的,由于该服务器是放在国外,很容易就导致安装失败。因此 我们需要修改镜像源地址。    全局安装nrm 镜源管理器 nrm里面存放了多个镜像服务器

 

 

npm install  nrm    -g

当像上面一样全局安装nrm时报错

 
  1. C:\WINDOWS\system32>npm i nrm -g

  2. npm ERR! Unexpected end of JSON input while parsing near '...nflight":"~1.0.4","in'

  3.  
  4. npm ERR! A complete log of this run can be found in:

  5. npm ERR! C:\Users\AppData\Roaming\npm-cache\_logs\2018-06-14T07_40_00_938Z-debug.log

二、问题解决

先清除缓存,再重新安装

 

  • 清除缓存
npm cache clean --force
  • 重新安装
npm install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值