首页   注册   登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Ionic
elviscai
V2EX  ›  Ionic

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

  •  
  •   elviscai · 2016-02-20 21:22:14 +08:00 · 3902 次点击
    这是一个创建于 1502 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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
    
    > [email protected] 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! [email protected] install: `node scripts/install.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] 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
    
    第 1 条附言  ·  2016-02-21 18:39:44 +08:00
    上述问题虽然还没搞明白,但参考 ionic 官方论坛的帖子终于装上了。就以下顺序安装即可……

    1. brew
    2. nvm
    3. node4
    4. cordova
    5. ionic

    via: https://forum.ionicframework.com/t/problems-with-getting-started-step-one/12993/7
    2 条回复    2016-02-21 16:34:26 +08:00
    zwh8800
        1
    zwh8800   2016-02-21 14:47:04 +08:00   ❤️ 1
    你看一下 /usr/local 的权限?
    elviscai
        2
    elviscai   2016-02-21 16:34:26 +08:00
    @zwh8800 admin 读写 / everyone 只读
    关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   4309 人在线   最高记录 5168   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 06:52 · PVG 14:52 · LAX 23:52 · JFK 02:52
    ♥ Do have faith in what you're doing.