angular - 当我尝试安装 Angular 时权限被拒绝

标签 angular npm

Error: EACCES: permission denied, access \'/Users/gs/.npm-global/lib/node_modules/@angular/cli\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path:
npm ERR!    '/Users/gs/.npm-global/lib/node_modules/@angular/cli' }

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
the command again as root/Administrator (though this is not recommended).

有趣的是,当我尝试下载它的 sudo 版本时,终端无法识别 ng

我的节点是10.16.3,我的npm是6.9.0

这是文件问题还是我的 Mac 问题?

最佳答案

您可以找到这个问题的答案here
或者
只需按照here中的步骤操作即可

关于angular - 当我尝试安装 Angular 时权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59740026/

相关文章:

angular - 使用 ReactiveForms 和 NgbModal 时的 ExpressionChangedAfterItHasBeenCheckedError

Angular Sidebar Treeview 没有响应

javascript - 从本地node_modules执行pug

security - NPM 6 - 我应该审计修复所有包漏洞吗?

grails - 如何使用 angular 2 的 grails 配置文件

javascript - IONIC 2 中受感染服务的实例类型

java - Angular元素在制作后显示白页

javascript - esm 不解析模块别名

docker - Docker镜像有效,Kubernetes Pod不起作用。 Ubuntu的。日志:/bin/sh:[npm,开始]:未找到

javascript - 如何在Windows上构建VSCode?