angular 创建项目时报错
ng new <项目名>
报错:
The operation was rejected by your operating system. //操作被您的操作系统拒绝。 It is likely you do not have the permissions to access this file as the current user //您可能没有权限作为当前用户访问此文件。 If you believe this might be a permissions issue, please double-check the //如果您认为这可能是权限问题,请重新检查 permissions of the file and its containing directories, or try running //文件及其包含目录的权限,或者尝试运行 npm ERR! the command again as root/Administrator (though this is not recommended). //命令再次作为根/管理员(虽然这是不推荐的)。
解决办法:
安装cnpm
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
查看安装成功命令:
cnpm -v
完美解决!
参考网址:https://www.jianshu.com/p/0a41419f42eb
原文:https://www.cnblogs.com/dapengFly/p/cnpm.html