Skip to content

Commit 34448db

Browse files
committed
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 <[email protected]>
1 parent b8a21db commit 34448db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ index 173e0bc669a2fd90e764da72e09003f4c7311fd7..6ff7527d4fe4d126bda80615ffed75f7
6161

6262
+#ifdef ELECTRON_ENSURE_CONFIG_GYPI
6363
+#ifndef USING_ELECTRON_CONFIG_GYPI
64-
+#error "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=8.4.0) if you're building modules directly."
64+
+#error "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly."
6565
+#endif
6666
+#endif
6767
+

0 commit comments

Comments
 (0)