System
Ubuntu 14.04
Node
v6.9.1
root@sigma:~# npm install hexo-cli -g
/root/.nvm/versions/node/v6.9.1/bin/hexo -> /root/.nvm/versions/node/v6.9.1/lib/node_modules/hexo-cli/bin/hexo
> [email protected] install /root/.nvm/versions/node/v6.9.1/lib/node_modules/hexo-cli/node_modules/dtrace-provider
> node scripts/install.js
sh: 1: node: Permission denied
> [email protected] postinstall /root/.nvm/versions/node/v6.9.1/lib/node_modules/hexo-cli/node_modules/hexo-util
> npm run build:highlight
sh: 1: npm: Permission denied
/root/.nvm/versions/node/v6.9.1/lib
└── (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/hexo-cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/hexo-cli/node_modules/dtrace-provider):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node scripts/install.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: spawn ENOENT
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/root/.nvm/versions/node/v6.9.1/bin/node" "/root/.nvm/versions/node/v6.9.1/bin/npm" "install" "hexo-cli" "-g"
npm ERR! node v6.9.1
npm ERR! npm v3.10.9
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: `npm run build:highlight`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] 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! /root/npm-debug.log
npm ERR! code 1
Have you tried sudo npm install hexo-cli -g?
Solved with npm config set unsafe-perm true
Most helpful comment
Solved with
npm config set unsafe-perm true