(1)安装cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org
(2)设置cnpm全局安装目录:
cnpm config set prefix %appdata%\npm
注:
<u></u>%appdata%\npm
是npm默认的全局安装目录:
npm config get prefix
=> %appdata%\npm
=> C:\Users\lvlf\AppData\Roaming\npm