node配置国内源

设置全局安装和缓存文件夹 node_globalnode_cache


npm config set prefix "C:\program\nodejs\node_global" #安装nodejs的路径位置
npm config set cache "C:\program\nodejs\node_cache"   #安装nodejs的路径位置

设置国内源和查看国内源 https://registry.npm.taobao.org


npm config set registry https://registry.npm.taobao.org   #设置国内源
npm config get registry #查看源

强制清理缓存 cache clean


npm cache clean --force

posted @ 2023-02-06 18:34  Janexiaoer  阅读(192)  评论(0)    收藏  举报