- npm:
- 显示当前的镜像地址:
npm get registry - 更换为淘宝的镜像地址:
npm config set registry http://registry.npm.taobao.org - 再次查看当前的镜像地址:
npm get registry
- nvm:
-
.bash_profile文件中添加:
export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs
- 执行
source ~/.bash_profile起效







网友评论