New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postinstall: `npm run build:highlight` failes leaving full hexo install unusable... #9

Closed
marcofranssen opened this Issue Feb 11, 2016 · 9 comments

Comments

10 participants
@marcofranssen

marcofranssen commented Feb 11, 2016

When doing an npm install it fails on:
postinstall: npm run build:highlight

It basically leaves my hexo install in an unusable state as it doesn't install the package hexo-renderer-marked, which is failing to do the postinstall in its package hexo-util.

Attached you find the full npm install logfile.

npm-debug.txt

@nurih

This comment has been minimized.

Show comment
Hide comment
@nurih

nurih Feb 11, 2016

Same here.
Went into package.json and changed versions to be exact ( like "0.2.0") rather than semver ("^0.2.0") as temp remedy. Looks like lodash is raises some warnings too.

nurih commented Feb 11, 2016

Same here.
Went into package.json and changed versions to be exact ( like "0.2.0") rather than semver ("^0.2.0") as temp remedy. Looks like lodash is raises some warnings too.

@flerro

This comment has been minimized.

Show comment
Hide comment
@flerro

flerro Jul 20, 2016

+1

Fresh install of hexo-cli fails on Ubuntu 16.04 (node v4.2.6 - npm v3.5.2) because of hexo-util

[npm-debug.txt](https://github.com/hexojs/hexo-util/files/373706/npm-debug.txt)


$ sudo npm install -g hexo-cli

/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-28-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-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "hexo-cli"
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!     /usr/local/lib/node_modules/npm-debug.log
npm ERR! code 1

Debug LOG: npm-debug.txt

@nurih may you elaborate about how you were able to solve the issue? Thanks

flerro commented Jul 20, 2016

+1

Fresh install of hexo-cli fails on Ubuntu 16.04 (node v4.2.6 - npm v3.5.2) because of hexo-util

[npm-debug.txt](https://github.com/hexojs/hexo-util/files/373706/npm-debug.txt)


$ sudo npm install -g hexo-cli

/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-28-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-28-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "hexo-cli"
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!     /usr/local/lib/node_modules/npm-debug.log
npm ERR! code 1

Debug LOG: npm-debug.txt

@nurih may you elaborate about how you were able to solve the issue? Thanks

@flerro

This comment has been minimized.

Show comment
Hide comment
@flerro

flerro Jul 21, 2016

I found a solution to this issue, instructions follow in case they are helpful for other fellow Ubuntu users out there.

The package.json postinstall script for hexo-util@0.6.0 was unable to find Node.js executable in path. In fact installing Node from the default Ubuntu repositories I got /usr/bin/nodejs instead of /usr/bin/node. I sym-linked the executable to fix the issue:

 $ cd /usr/bin
 $ ln -s nodejs node 

flerro commented Jul 21, 2016

I found a solution to this issue, instructions follow in case they are helpful for other fellow Ubuntu users out there.

The package.json postinstall script for hexo-util@0.6.0 was unable to find Node.js executable in path. In fact installing Node from the default Ubuntu repositories I got /usr/bin/nodejs instead of /usr/bin/node. I sym-linked the executable to fix the issue:

 $ cd /usr/bin
 $ ln -s nodejs node 

@NoahDragon NoahDragon closed this Sep 30, 2016

@lightpencil

This comment has been minimized.

Show comment
Hide comment
@lightpencil

lightpencil Jan 28, 2017

Same error, and sym_link can't solve it. Debug Log:
npm-debug.txt

lightpencil commented Jan 28, 2017

Same error, and sym_link can't solve it. Debug Log:
npm-debug.txt

@charleyking

This comment has been minimized.

Show comment
Hide comment
@charleyking

charleyking Feb 14, 2017

I have this problem too. My system is windows 1 0.

charleyking commented Feb 14, 2017

I have this problem too. My system is windows 1 0.

@jacobmischka

This comment has been minimized.

Show comment
Hide comment
@jacobmischka

jacobmischka Mar 2, 2017

This also seems to happen if you install hexo using yarn, running rm -r node_modules && npm install worked for me.

jacobmischka commented Mar 2, 2017

This also seems to happen if you install hexo using yarn, running rm -r node_modules && npm install worked for me.

@twesix

This comment has been minimized.

Show comment
Hide comment
@twesix

twesix Sep 8, 2017

Same problem . Im running as root.

The way to solve this is running:

npm install -g --unsafe-perm hexo-cli

--unsafe-perm can avoid the permission issue.

see : https://docs.npmjs.com/misc/config#unsafe-perm

twesix commented Sep 8, 2017

Same problem . Im running as root.

The way to solve this is running:

npm install -g --unsafe-perm hexo-cli

--unsafe-perm can avoid the permission issue.

see : https://docs.npmjs.com/misc/config#unsafe-perm

@D0048

This comment has been minimized.

Show comment
Hide comment
@D0048

D0048 Oct 3, 2017

Same here.

D0048 commented Oct 3, 2017

Same here.

@fisher-monkey

This comment has been minimized.

Show comment
Hide comment
@fisher-monkey

fisher-monkey Nov 4, 2017

@twesix Actually I have fixed the issue following your way.

fisher-monkey commented Nov 4, 2017

@twesix Actually I have fixed the issue following your way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment