安装cnpm需要一个最高权限
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose
此时会提示让你输入一个密码,即你的用户开机密码,输入回车即可,如果出现下面的信息(最下面几行)说明安装成功:
npm info lifecycle cnpm@5.1.1~postinstall: cnpm@5.1.1
npm verb unlock done using /Users/lijia/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
- cnpm@5.1.1
added 692 packages in 29.865s
npm verb exit [ 0, true ]
npm info ok
好了,输入下面的命令查询一下吧
cnpm -v
网友评论