Skip to content

Instantly share code, notes, and snippets.

@dperrymorrow
Last active April 5, 2017 17:57
Show Gist options
  • Save dperrymorrow/28f8828dca396725142f8d76203332a9 to your computer and use it in GitHub Desktop.
Save dperrymorrow/28f8828dca396725142f8d76203332a9 to your computer and use it in GitHub Desktop.
manually rebuilding a native module for electron

Install electron-gyp

npm install electron-gyp -g

Get your electron version

$ electron -v

The rebuild the native module for your version of electron

replace target= with your version of electron from above

$ cd {your_app}node_modules/{your native module}/
HOME=~/.electron-gyp node-gyp rebuild --target={your electron v} --arch=x64 --dist-url=https://atom.io/download/electron

Example:

$ cd snap/node_modules/spellchecker/
HOME=~/.electron-gyp node-gyp rebuild --target=1.2.3 --arch=x64 --dist-url=https://atom.io/download/electron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment