From 872890ea5cd3b0f2ee477536ba314eb76fa0e888 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Fri, 24 Aug 2018 14:28:11 -0700 Subject: [PATCH] docs: Developer instructions for native Node addons (#13121) * docs: Developer instructions for native Node addons Credits for actually finding this easy method goes to @nornagon. * :memo: Of course there's a typo --- docs/tutorial/using-native-node-modules.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/tutorial/using-native-node-modules.md b/docs/tutorial/using-native-node-modules.md index bcc72ce7d7c88..f6269a6620b04 100644 --- a/docs/tutorial/using-native-node-modules.md +++ b/docs/tutorial/using-native-node-modules.md @@ -67,6 +67,16 @@ The `HOME=~/.electron-gyp` changes where to find development headers. The where to download the headers. The `--arch=x64` says the module is built for 64bit system. +### Manually building for a custom build of Electron + +To compile native Node addons against a custom build of Electron that doesn't +match a public release, instruct `npm` to use the version of Node you have bundled +with your custom build. + +```sh +npm rebuild --nodedir=$HOME/.../path/to/electron/vendor/node +``` + ## Troubleshooting If you installed a native module and found it was not working, you need to check