1、network Socket timeout,如下:
解决:修改超时时长。
npm config set fetch-retry-mintimeout 20000
npm config set fetch-retry-maxtimeout 120000
2、Cannot read property 'pickAlgorithm' of null,如下:
解决:
- 删除项目中的
node-modules;
- 执行 npm cache clear --force
npm cache clear --force
3、执行npm cache clear --force
,显示npm WARN using --force Recommended protections disabled.
解决:降低npm版本 ,再执行npm cache clear --force
npm install npm@6.14.10 -g
4、code EINTEGRITY
解决:
直接删除 package-lock.json
文件,升级npm,再执行 npm install
即可。