Skip to content

Conversation

@trop
Copy link
Contributor

@trop trop bot commented Apr 11, 2023

Backport of #37829

See that PR for details.

Notes: Fix recommended node-gyp version in node.h error

In
https://github.com/electron/electron/blob/main/docs/tutorial/using-native-node-modules.md#using-npm,
we recommend setting the `npm_config_disturl` variable but doing that
does not work on node-gyp v8.4.0 because after
nodejs/node-gyp#2497
landed, the dist URL was read only from `gyp.opts['dist-url']`. The fix
for reading the value from `npm_config_disturl` by parsing
`gyp.opts.disturl` was landed in
nodejs/node-gyp#2547 and that change was
released in node-gyp v9.0.0, so this change updates the error macro to
recommend node-gyp v9.0.0 as the minimum required version.

Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Darshan Sen <raisinten@gmail.com>
@trop trop bot requested a review from a team as a code owner April 11, 2023 11:27
@trop trop bot requested a review from RaisinTen April 11, 2023 11:27
@trop trop bot added 25-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Apr 11, 2023
@codebytere codebytere merged commit 95b727c into 25-x-y Apr 11, 2023
@codebytere codebytere deleted the trop/25-x-y-bp-fix-recommended-node-gyp-version-in-node-h-error-1681212422715 branch April 11, 2023 20:13
@release-clerk
Copy link

release-clerk bot commented Apr 11, 2023

Release Notes Persisted

Fix recommended node-gyp version in node.h error

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

Labels

25-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants