一直用的是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
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错误,但是等一下就好了。 |