1. 程式人生 > >mac安裝淘寶映象cnpm,絕對有效!!!!!!

mac安裝淘寶映象cnpm,絕對有效!!!!!!

安裝cnpm需要一個最高許可權 

sudo npm install -g cnpm --registry=https://registry.npm.taobao.org --verbose

此時會提示讓你輸入一個密碼,即你的使用者開機密碼,輸入回車即可,如果出現下面的資訊(最下面幾行)說明安裝成功:

npm info lifecycle [email protected]~postinstall: [email protected]

npm verb unlock done using /Users/lijia/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging

+ [email protected]

added 692 packages in 29.865s

npm verb exit [ 0, true ]

npm info ok

好了,輸入下面的命令查詢一下吧

cnpm -v