【发布时间】:2018-03-03 06:58:37
【问题描述】:
当我尝试使用终端命令安装 angular/cli 时。
之后的“[sudo] nam install -g @angular/cli”gyp verb tmpdir == cwd automatically will remove dev files after to save disk space
gyp verb command install [ '8.9.4' ]
gyp verb install input version string "8.9.4"
gyp verb install installing version: 8.9.4
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 8.9.4
gyp verb ensuring nodedir is created /usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.9.4
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/8.9.4"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp"
你可以看到最后一行警告 EACCES 用户“root”没有权限访问开发目录“/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/.node-gyp/ 8.9.4"
之后我使用“ls -la /usr/local/bin”检查了目录
Niteshs-Air:~ niteshwaghmare$ ls -la /usr/local
total 0
drwxr-xr-x 8 root wheel 256 Mar 2 22:01 .
drwxr-xr-x@ 9 root wheel 288 Dec 2 01:02 ..
-rw-r--r-- 1 root wheel 0 Mar 1 21:32 .com.apple.installer.keep
drwxr-xr-x 8 root wheel 256 Mar 3 20:38 bin
drwxr-xr-x 2 root wheel 64 Mar 2 22:01 etc
drwxr-xr-x 3 root wheel 96 Jan 3 08:23 include
drwxr-xr-x 4 root wheel 128 Jan 3 08:23 lib
drwxr-xr-x 5 root wheel 160 Jan 3 08:23 share
【问题讨论】:
标签: angular npm-install