atom / node-spellchecker

SpellChecker Node Module
http://atom.github.io/node-spellchecker
MIT License
298 stars 106 forks source link

NODE_MODULE_VERSION 85 required #139

Open XNinety9 opened 3 years ago

XNinety9 commented 3 years ago

Description

Can't add spellchecker to project because it requires NODE_MODULE_VERSION 85.

When I add it to my project and start the whole thing, I get this message:

App threw an error during load
Error: The module '/Users/user/Documents/Repositories/project/node_modules/spellchecker/build/Release/spellchecker.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 83. This version of Node.js requires
NODE_MODULE_VERSION 85. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).

I tried:

Nothing works :(

Can someone help?

Aerijo commented 3 years ago

Electron makes changes to node that result in incompatibilities. IIRC, they use a different module version for this reason. But in general, it is unlikely (and fragile) that the node version in use by your app is the same as the one being used to install dependencies.

To fix your error, you need to recompile the module for the version of Electron your app will be running. One way is to configure npm with the appropriate target information. Another is to install and run electron-rebuild, which will configure it for you.