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

node 18 support #647

Open
amchiclet opened this issue Apr 29, 2022 · 8 comments · May be fixed by #649
Open

node 18 support #647

amchiclet opened this issue Apr 29, 2022 · 8 comments · May be fixed by #649

Comments

@amchiclet
Copy link

Are there any plans and/or timeline to support node 18? Thank you!

@ronilan
Copy link
Contributor

ronilan commented May 4, 2022

Not sure what the exact issue is but we use node-pre-gyp extensively for https://www.npmjs.com/package/@appoptics/apm-bindings and all is OK with node 18 (see: multi platform test run)

@amchiclet
Copy link
Author

Good to know. Let me see if I can learn something for your runs.

Here are steps to reproduce in our case (pprof-nodejs).

$ git clone https://github.com/google/pprof-nodejs.git
$ cd pprof-nodejs/
$ npm install
$ ./node_modules/.bin/node-pre-gyp configure rebuild package --target=18.0.0 --target_arch="x64"

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@1.0.9
node-pre-gyp info using node@18.0.0 | linux | x64
node-pre-gyp ERR! UNCAUGHT EXCEPTION 
node-pre-gyp ERR! stack Error: Unsupported target version: 18.0.0

@ronilan
Copy link
Contributor

ronilan commented May 4, 2022

The error is due to the use of the --target flag. Since the it relays on "hard coded" values in: https://github.com/mapbox/node-pre-gyp/blob/master/lib/util/abi_crosswalk.json and those have not been updated to node 18 you get the error.

The target flag is for "special cases" (see: https://github.com/mapbox/node-pre-gyp/blob/master/lib/util/versioning.js#L105) so I'd check to see if you really need those flags for the workflows.

In any case - updating the json is part of the release process (see: https://github.com/mapbox/node-pre-gyp/blob/master/contributing.md). Not sure when this is planned for.

@amchiclet
Copy link
Author

amchiclet commented May 4, 2022

Looking at this code, it means while waiting for the crosswalk file to catch up with node 18, I could achieve the same effect as

./node_modules/.bin/node-pre-gyp configure rebuild package --target=18.0.0 --target_arch="x64"

by running

./node_modules/.bin/node-pre-gyp configure rebuild package

on an x64 machine with node 18.0.0 active.

Is my understanding correct?

@nolanmar511
Copy link

The --target flag is definitely super useful for how we are creating pre-built binaries in github.com/google/pprof-nodejs (it allows us to generate pre-built binaries without installing multiple versions of the Node.js on the machine generating the prebuilt binaries).

Is there a path to getting #649 submitted, or should we plan to change how we build pre-built binaries if we'd like to add support for Node 18?

@ronilan
Copy link
Contributor

ronilan commented Jun 14, 2022

@nolanmar511 you are aware of #657 right?

@rbirkgit
Copy link

rbirkgit commented Sep 23, 2022

I am having issues with Node 18 as well. Getting errors when installing nodejieba. With Node 16 it works fine, node-pre-gyp is throwing the errors.

@cclauss
Copy link

cclauss commented Apr 14, 2024

For support of Node.js > v17, see the workaround:

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

Successfully merging a pull request may close this issue.

5 participants