# 当前session生效
npm --registry https://registry.npm.taobao.org install nodejs-xx
# 终身生效
npm config set registry https://registry.npm.taobao.org
# 查询npm源设置
# 通过config进行相关配置,同样可以通过config来查询,使用tab进行命令补全即可看到相关命令
npm config get registry
# 修改回官方源
npm config set registry https://registry.npmjs.org
← 动手实现一个MQ Switch管理平台 →