[求助] Ionic 安装不能: Error: EACCES: permission denied, uv_cwd

2016-02-20 21:22:14 +08:00
 elviscai

OS X 10.11.3
node 4.3.1
npm 2.14.12

$ sudo npm install -g ionic
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic

> node-sass@3.4.2 install /usr/local/lib/node_modules/ionic/node_modules/node-sass
> node scripts/install.js

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied
path.js:424
    var path = (i >= 0) ? arguments[i] : process.cwd();
                                                 ^

Error: EACCES: permission denied, uv_cwd
    at Error (native)
    at Object.posix.resolve (path.js:424:50)
    at startup (node.js:91:32)
    at node.js:962:3
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ionic"
npm ERR! node v4.3.1
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.4.2 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.4.2 install script 'node scripts/install.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/elviscai/npm-debug.log
6841 次点击
所在节点    Ionic
2 条回复
zwh8800
2016-02-21 14:47:04 +08:00
你看一下 /usr/local 的权限?
elviscai
2016-02-21 16:34:26 +08:00
@zwh8800 admin 读写 / everyone 只读

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/257911

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX