linux: npm配置镜像源

一,查看镜像源

$ npm config get registry

二,配置镜像源:

执行:

npm config set registry https://registry.npmmirror.com

如下:

lhd@lhd-pc:~$ npm config get registry
https://registry.npmjs.org/
lhd@lhd-pc:~$ npm config set registry https://registry.npmmirror.com
lhd@lhd-pc:~$ npm config get registry
https://registry.npmmirror.com

 

posted @ 2026-09-14 14:24  刘宏缔的架构森林  阅读(7)  评论(0)    收藏  举报