npm源、yarn源、淘宝源

npm源:

https://registry.npmjs.org/

yarn源:

https://registry.yarnpkg.com

淘宝源:

https://registry.npm.taobao.org

 

临时改变源的方法:

npm install node-sass --registry=http://registry.npm.taobao.org

 

清除缓存:

有时候使用国内镜像还是会出现下载超时的问题,可以通过清除缓存后再次尝试
npm cache clean --force
如果这种清除缓存的方式还不行可以试试大招
1、删除npmrc文件,删除C:\Users\Administrator.npmrc文件
2、C:\Users\Administrator\AppData\Roaming\npm-cache 清空,
3、删除项目下:node_modules
4、用命令清理,控制台输入:
npm cache clean --force

posted @ 2021-04-26 21:41  芥末Yuki  阅读(310)  评论(0)    收藏  举报