V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Eymard
V2EX  ›  问与答

想把 win 上的 hexo 换到 mac 里 却报错了

  •  
  •   Eymard · 2015-02-04 15:25:27 +08:00 · 6190 次点击
    这是一个创建于 3580 天前的主题,其中的信息可能已经有所发展或是发生改变。

    一直用的是win上的hexo,从来没发生过问题,结果今天配置mac上的环境怎么弄也弄不好,不太会用终端 = =
    sudo npm install -g hexo
    Password:

    [email protected] install /usr/local/lib/node_modules/hexo/node_modules/chokidar/node_modules/fsevents
    node-gyp rebuild

    gyp ERR! UNCAUGHT EXCEPTION
    gyp ERR! stack Error: EPERM, utime '/Users/zhanghaoyu/.node-gyp/0.10.36'
    gyp ERR! System Darwin 13.4.0
    gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /usr/local/lib/node_modules/hexo/node_modules/chokidar/node_modules/fsevents
    gyp ERR! node -v v0.10.36
    gyp ERR! node-gyp -v v1.0.1
    gyp ERR! This is a bug in node-gyp.
    gyp ERR! Try to update node-gyp and file an Issue if it does not help:
    gyp ERR! https://github.com/TooTallNate/node-gyp/issues
    npm WARN optional dep failed, continuing [email protected]
    /usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo/bin/hexo
    npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/npm-package-arg requires semver@'4' but will load
    npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/semver,
    npm WARN unmet dependency which is version 2.3.0
    npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/read-installed/node_modules/readdir-scoped-modules requires graceful-fs@'^3.0.4' but will load
    npm WARN unmet dependency /usr/local/lib/node_modules/npm/node_modules/graceful-fs,
    npm WARN unmet dependency which is version 3.0.2
    [email protected] /usr/local/lib/node_modules/hexo
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected])
    ├── [email protected]
    ├── [email protected]
    ├── [email protected]
    ├── [email protected] ([email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
    ├── [email protected] ([email protected])
    ├── [email protected] ([email protected], [email protected], [email protected], [email protected])
    └── [email protected] ([email protected], [email protected])
    求大牛指点迷津 T T

    6 条回复    2015-09-03 23:01:46 +08:00
    Eymard
        1
    Eymard  
    OP
       2015-02-04 15:52:13 +08:00
    求帮助 T T
    mcfog
        2
    mcfog  
       2015-02-04 16:36:42 +08:00
    试试看
    ```
    sudo npm up npm -g
    ```
    升级一下npm试试看
    Eymard
        3
    Eymard  
    OP
       2015-02-04 22:03:41 +08:00
    @mcfog 还是报错..
    npm ERR! System Darwin 13.4.0
    npm ERR! command "node" "/usr/local/bin/npm" "up" "npm" "-g"
    npm ERR! cwd /Users/
    npm ERR! node -v v0.10.36
    npm ERR! npm -v 1.4.28
    npm ERR! path /usr/local/share/man/man1/npm-adduser.1
    npm ERR! code EEXIST
    npm ERR! error rolling back Error: Refusing to delete: /usr/local/share/man/man1/npm-README.1 not in /usr/local/lib/node_modules/npm
    npm ERR! error rolling back at clobberFail (/usr/local/lib/node_modules/npm/lib/utils/gently-rm.js:57:12)
    npm ERR! error rolling back at next (/usr/local/lib/node_modules/npm/lib/utils/gently-rm.js:43:14)
    npm ERR! error rolling back at /usr/local/lib/node_modules/npm/lib/utils/gently-rm.js:52:12
    npm ERR! error rolling back at Object.oncomplete (evalmachine.<anonymous>:108:15)
    npm ERR! error rolling back { [Error: Refusing to delete: /usr/local/share/man/man1/npm-README.1 not in /usr/local/lib/node_modules/npm]
    npm ERR! error rolling back code: 'EEXIST',
    npm ERR! error rolling back path: '/usr/local/share/man/man1/npm-README.1' }
    npm ERR! not ok code 0
    Eymard
        4
    Eymard  
    OP
       2015-02-05 16:25:57 +08:00
    弄了一天还是不行,究竟是什么问题....
    sky200277
        5
    sky200277  
       2015-02-17 10:31:23 +08:00
    一样遇到这个问题,现在已解决。说一下解决方案:
    sudo npm install -g hexo --registry=https://registry.npm.taobao.org
    这样做后虽然仍然会有warn错误,但是等一下就好了。
    waylife
        6
    waylife  
       2015-09-03 23:01:46 +08:00
    @mcfog 有用, thx 。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2799 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 07:21 · PVG 15:21 · LAX 23:21 · JFK 02:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.