-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node module version error #79
Comments
It looks like there are two different environments with different Node versions. One environment is used to build a library, another is to run it. There is no way around it. Electron comes with some black magic for native modules, which breaks when precompiled modules are used — looks like it uses a wrong Node for it. There is even a note about it.
Let me know if it works for you and I'll add it to the wiki. |
Thanks. That got rid of the error. My code still produces the issue where the main Electron window doesn't appear to load -- the same result when I did npm rebuild. But at least it executes and outputs to the console, which it failed to do before. I suspect it's working properly under the hood and there's an issue with my content security policy that its preventing the window from displaying properly. I'll deal with that when I have time. Thanks again. |
Node 12.16.3
NVM 0.35.3
macOS 10.15.6
Electron 10.1.1
re2 1.15.4
npm 6.14.4
I get this error in the console with an RSS app I'm working on. I've tried deleting node_modules and package-lock.json then npm i and ./node_modules/.bin/electron-rebuild but that disconnects Chrome DevTools so I can't inspect the app.
Without the rebuild, the app runs but throws the error below in the console.
Node.js 12.16.3 corresponds with Node Module Version 72.
82 lists Electron 10.
Any ideas beyond reverting to an older version of Electron?
Uncaught Error: The module '/Users/xxx/Code/Git/xxx/node_modules/re2/build/Release/re2.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 82. Please try re-compiling or re-installing
the module (for instance, using
npm rebuild
ornpm install
).at process.func [as dlopen] (electron/js2c/asar.js:140)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1196)
at Object.func [as .node] (electron/js2c/asar.js:140)
at Module.load (internal/modules/cjs/loader.js:981)
at Module._load (internal/modules/cjs/loader.js:881)
at Function.Module._load (electron/js2c/asar.js:769)
at Module.require (internal/modules/cjs/loader.js:1023)
at require (internal/modules/cjs/helpers.js:77)
at Object. (/Users/xxx/Code/Git/xxx/node_modules/re2/re2.js:3)
at Object. (/Users/xxx/Code/Git/xxx/node_modules/re2/re2.js:26)
The text was updated successfully, but these errors were encountered: