When I try to build my applicaton using electron it crashes on leveldown library
Error: The module '/Users/macosx/Documents/Electron/node_modules/leveldown/build/Release/leveldown.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
I have tried
rm -rf node_modules/leveldown
npm install
npm rebuild leveldown--update-binary
npm uninstall leveldown
Also tried this
I had the same problem and nothing mentioned here worked for me. Here is what >worked for me:
Require all dependencies you need in the main.js file that is run by electron. (this seemed to be the first important part for me) Run npm i -D electron-rebuild to add the electron-rebuild package Remove the node-modules folder, as well as the packages-lock.json file. Run npm i to install all modules. Run ./node_modules/.bin/electron-rebuild to rebuild everything It is very important to run ./node_modules/.bin/electron-rebuild directly after npm i otherwise it did not work on my mac.