linux用npm安装hexo失败?
本文介绍了linux用npm安装hexo失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
jjq@jjq:~/git/hexo$ sudo npm install hexo-cli -g
/usr/local/bin/hexo -> /usr/local/lib/node_modules/hexo-cli/bin/hexo
> dtrace-provider@0.6.0 install /usr/local/lib/node_modules/hexo-cli/node_modules/dtrace-provider
> node scripts/install.js
sh: 1: node: not found
npm WARN install:dtrace-provider@0.6.0 dtrace-provider@0.6.0 install: `node scripts/install.js`
npm WARN install:dtrace-provider@0.6.0 spawn ENOENT
> hexo-util@0.6.0 postinstall /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-util
> npm run build:highlight
> hexo-util@0.6.0 build:highlight /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-util
> node scripts/build_highlight_alias.js > highlight_alias.json
sh: 1: node: not found
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build:highlight"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! hexo-util@0.6.0 build:highlight: `node scripts/build_highlight_alias.js > highlight_alias.json`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the hexo-util@0.6.0 build:highlight script 'node scripts/build_highlight_alias.js > highlight_alias.json'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hexo-util package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build_highlight_alias.js > highlight_alias.json
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hexo-util
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hexo-util
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /usr/local/lib/node_modules/hexo-cli/node_modules/hexo-util/npm-debug.log
/usr/local/lib
└── (empty)
npm WARN optional Skipping failed optional dependency /hexo-cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.14
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo-cli" "-g"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! hexo-util@0.6.0 postinstall: `npm run build:highlight`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hexo-util@0.6.0 postinstall script 'npm run build:highlight'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the hexo-util package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build:highlight
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs hexo-util
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls hexo-util
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/jjq/git/hexo/npm-debug.log
npm ERR! code 1
这是出错日志,请问是什么原因?
解决方案
你的npm
以及nodejs
安装上了吗?
这篇关于linux用npm安装hexo失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文