安裝cnpm需要一個最高權(quán)限
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose
此時會提示讓你輸入一個密碼镣典,即你的用戶開機密碼,輸入回車即可唾琼,如果出現(xiàn)下面的信息(最下面幾行)說明安裝成功:
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