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

错误信息

Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! at Error

错误原因:权限不足,以下即可

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