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