一直用的是win上的hexo,从来没发生过问题,结果今天配置mac上的环境怎么弄也弄不好,不太会用终端 = =
sudo npm install -g hexo
Password:
fsevents@0.2.0 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 fsevents@0.2.0
/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
hexo@2.8.3 /usr/local/lib/node_modules/hexo
├── strip-indent@0.1.3
├── hexo-front-matter@0.0.4
├── sprintf-js@0.0.7
├── graceful-fs@3.0.5
├── colors@0.6.2
├── mime@1.2.11
├── minimist@0.2.0
├── async@0.9.0
├── warehouse@0.2.2 (async@0.7.0)
├── highlight.js@8.1.0
├── lodash@2.4.1
├── moment@2.9.0
├── js-yaml@3.2.5 (esprima@1.0.4, argparse@0.1.16)
├── morgan@1.5.1 (depd@1.0.0, basic-auth@1.0.0, debug@2.1.1, on-finished@2.2.0)
├── connect@3.3.4 (utils-merge@1.0.0, parseurl@1.3.0, debug@2.1.1, finalhandler@0.3.3)
├── compression@1.4.0 (on-headers@1.0.0, vary@1.0.0, bytes@1.0.0, compressible@2.0.2, accepts@1.2.3, debug@2.1.1)
├── cheerio@0.17.0 (entities@1.1.1, dom-serializer@0.0.1, CSSselect@0.4.1, htmlparser2@3.7.3)
├── chokidar@0.8.2 (recursive-readdir@0.0.2)
├── serve-static@1.8.1 (escape-html@1.0.1, utils-merge@1.0.0, parseurl@1.3.0, send@0.11.1)
└── swig@1.4.1 (optimist@0.6.1, uglify-js@2.4.16)
求大牛指点迷津 T T
![]() |
1
Eymard OP 求帮助 T T
|
![]() |
2
mcfog 2015-02-04 16:36:42 +08:00
试试看
``` sudo npm up npm -g ``` 升级一下npm试试看 |
![]() |
3
Eymard OP @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 |
![]() |
4
Eymard OP 弄了一天还是不行,究竟是什么问题....
|
![]() |
5
sky200277 2015-02-17 10:31:23 +08:00
一样遇到这个问题,现在已解决。说一下解决方案:
sudo npm install -g hexo --registry=https://registry.npm.taobao.org 这样做后虽然仍然会有warn错误,但是等一下就好了。 |