1.采用新的镜像地址
npm config set registry https://registry.npmmirror.com
2.清理缓存
npm cache clean --force
3.安装yarn
npm install -g yarn
注意yarn的默认安装路径(Windows)在
C:\Users\用户名\AppData\Roaming\npm\node_modules\yarn\
4.用yarn安装包
之后用yarn install安装包即可