From 904505bb2143f1af2dece0d2178ccbed7036b5fd Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Mon, 4 May 2015 22:39:55 -0700 Subject: [PATCH] Suggest electron-rebuild for building native modules --- docs/tutorial/using-native-node-modules.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/tutorial/using-native-node-modules.md b/docs/tutorial/using-native-node-modules.md index 95192aee0a1b..643b4915b7ed 100644 --- a/docs/tutorial/using-native-node-modules.md +++ b/docs/tutorial/using-native-node-modules.md @@ -18,6 +18,19 @@ For old modules that only support Node v0.10.x, you should use the ## How to install native modules +### The Easy Way + +The most straightforward way to rebuild native modules is via the +[`electron-rebuild`](https://github.com/paulcbetts/electron-rebuild) package, +which handles the manual steps of downloading headers and building native modules: + +```sh +npm install --save-dev electron-rebuild + +# Every time you run npm install, run this too +./node_modules/.bin/electron-rebuild +``` + ### The node-gyp way To build Node modules with headers of Electron, you need to tell `node-gyp`