Reputation: 3209
I have a node project in which I use NodeJS 14.15.0
and the latest build of Electron 12.0.0
.
NodeJS version 14.15.0
has a NODE_MODULE_VERSION
83 according to their webpage.
Electron version v12.0.0
uses this node version of 14.15.0
. but on their webpage it says the module NODE_MODULE_VERSION
is 87
Therefore I have a mismatch between these two versions. I need a match so I can load the same binary intro an Electron app + execute by a node.js instance.
Upvotes: 2
Views: 2285
Reputation: 4775
Electron maintains and compiles their own fork of Node, in a way that may not be compatible with normal Node. Electron intentionally uses unique NODE_MODULE_VERSION
to signal this fact to software.
You'll need to recompile native modules using electron-rebuild
.
Native Node modules are supported by Electron, but since Electron is very likely to use a different V8 version from the Node binary installed on your system, the modules you use will need to be recompiled for Electron.
The maintainers of Node and Electron discussed possible options, and decided to use offset versioning in this issue:
https://github.com/nodejs/TSC/issues/651
Upvotes: 5