Skip to content
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

this fails on your system: npm ERR! npm run build:highlight #24

Closed
zengyee opened this issue Apr 4, 2017 · 8 comments
Closed

this fails on your system: npm ERR! npm run build:highlight #24

zengyee opened this issue Apr 4, 2017 · 8 comments

Comments

@zengyee
Copy link

zengyee commented Apr 4, 2017

npm WARN optional Skipping failed optional dependency /hexo-cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 4.8.0-45-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! [email protected] postinstall: npm run build:highlight
npm ERR! Exit status 1
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! /home/jeffrey/github/codeleague.github.io/npm-debug.log
npm ERR! code 1

@NoahDragon
Copy link
Member

Does /usr/bin/nodejs exist?

hexojs/hexo#2095

@waterzhou
Copy link

npm WARN optional Skipping failed optional dependency /hexo-cli/chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm ERR! Linux 4.8.0-49-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! [email protected] postinstall: npm run build:highlight
npm ERR! Exit status 1
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! /work/hardware/ESP32/npm-debug.log
npm ERR! code 1

I also encounter the same problem. And I also checked usr/bin/nodejs existed indeed.

@NoahDragon
Copy link
Member

@waterzhou this issue is really hard to reproduce, and it is usually related to the system/npm environment.

@disburden
Copy link

same question

@sky-admin
Copy link

same question +1, windows 10,node 8,npm 5.4

@demurgos
Copy link
Contributor

Possibly related issue: hexojs/hexo-cli#23

Someone mentioned a Docker file to reproduce this issue: hexojs/hexo-cli#23 (comment)

More generally, could you explain the rationale for running a postinstall hook? The main use case I see is if you have a system dependent build that you absolutely can't run during the publish step. Here you're just generating a .json. A better solution would be to use a prepare hook (that runs during before publication to npm, or when installing this package as the top-level package, for development for example).

This was referenced Oct 26, 2017
demurgos added a commit to demurgos/hexo-util that referenced this issue Oct 26, 2017
Use a `prepare` hook instead of a `postinstall` hook to generate
the `highlight_alias.json` file. This means that the file is generated
during the publication of package to npm or when manually running
`npm install` in the project directory.
The previous behavior was to generate this step on the consumer
side: this was the cause of numerous hard-to-reproduce issues due
to the variety of environments.

Closes hexojs#20
Closes hexojs#23
Closes hexojs#24
demurgos added a commit to demurgos/hexo-util that referenced this issue Oct 26, 2017
Use a `prepare` hook instead of a `postinstall` hook to generate
the `highlight_alias.json` file. This means that the file is generated
during the publication of package to npm or when manually running
`npm install` in the project directory.
The previous behavior was to generate this step on the consumer
side: this was the cause of numerous hard-to-reproduce issues due
to the variety of environments.

Closes hexojs#20
Closes hexojs#23
Closes hexojs#24
demurgos added a commit to demurgos/hexo-util that referenced this issue Oct 26, 2017
Use a `prepare` hook instead of a `postinstall` hook to generate
the `highlight_alias.json` file. This means that the file is generated
during the publication of package to npm or when manually running
`npm install` in the project directory.
The previous behavior was to generate this step on the consumer
side: this was the cause of numerous hard-to-reproduce issues due
to the variety of environments.

Closes hexojs#20
Closes hexojs#23
Closes hexojs#24
demurgos added a commit to demurgos/hexo-util that referenced this issue Oct 26, 2017
Use a `prepare` hook instead of a `postinstall` hook to generate
the `highlight_alias.json` file. This means that the file is generated
during the publication of package to npm or when manually running
`npm install` in the project directory.
The previous behavior was to generate this step on the consumer
side: this was the cause of numerous hard-to-reproduce issues due
to the variety of environments.

Closes hexojs#20
Closes hexojs#23
Closes hexojs#24
@demurgos
Copy link
Contributor

@NoahDragon I sent a PR to solve this issue. Could you take a look at it?

@NoahDragon
Copy link
Member

@demurgos Thank you very much. I will have a look.

demurgos added a commit to demurgos/hexo-util that referenced this issue Oct 27, 2017
Use a `prepare` hook instead of a `postinstall` hook to generate
the `highlight_alias.json` file. This means that the file is generated
during the publication of package to npm or when manually running
`npm install` in the project directory.
The previous behavior was to generate this step on the consumer
side: this was the cause of numerous hard-to-reproduce issues due
to the variety of environments.

Closes hexojs#20
Closes hexojs#23
Closes hexojs#24
NoahDragon pushed a commit that referenced this issue Nov 7, 2017
Use a `prepare` hook instead of a `postinstall` hook to generate
the `highlight_alias.json` file. This means that the file is generated
during the publication of package to npm or when manually running
`npm install` in the project directory.
The previous behavior was to generate this step on the consumer
side: this was the cause of numerous hard-to-reproduce issues due
to the variety of environments.

Closes #20
Closes #23
Closes #24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants