mac上安装完成node,就升级好了npm,之后的设置
1.打开终端输入:
npm config list
找到npmrc
globalconfig /usr/local/etc/npmrc
2.打开npmrc
sudo vim /usr/local/etc/npmrc
3.编辑npmrc如下:
registry=https://registry.npm.taobao.org/
disturl=https://npm.taobao.org/dist
cache=$HOME/.npm/.cache/cnpm/
suerconfig=$HOME/.cnpmrc
4.esc退出保存。
初学勇的博客随笔