想要用淘宝镜像,在下载cpnm时报错。 错误提示是因为在下载时没有管理员权限。 解决方案:sudo npm install -g cnpm --registry=http://registry.npm.taobao.org 然后输入你的开机密码,赋予权限。