前言
今日安装依赖的时候突然报错
步骤
- 以
管理员身份
运行cmd并清除npm的缓存
C:UsersWangYang>npm cache clean -f
npm WARN using --force I sure hope you know what you are doing.
- 安装n模块
C:UsersWangYang>npm install -g n --force
npm WARN using --force I sure hope you know what you are doing.
C:UsersWangYangAppDataRoamingnpmn -> C:UsersWangYangAppDataRoamingnpmnode_modulesnbinn
n@6.7.0
added 1 package from 4 contributors in 0.799s
- 进入到项目,重新安装依赖
E:ProjectSCRM-APP-H5>cnpm install
/ [23/75] Installing y18n@^3.2.1
.....
.....
√ All packages installed (1394 packages installed from npm registry, used 35s(network 20s), speed 253.35kB/s, json 1147(2.98MB), tarball 2.07MB)