Node Module Version Mismatch: Expected 50

Alfo

I've had this problem where, from a brand new installation of Node and npm, the serial port package won't load with the following error in the Hello World Electron package:

enter image description here

I am on Node version 6.6.0 and NPM version 3.10.7 and OS X 10.11.6.

I looked to see if I was somehow out of date, but looking at this list, I can't find anything that has a module version of 50. Is this a bug?

I have tried npm rebuild, as well as removing modules and reinstalling, but no dice.

Update: even though when I run node -v it prints v6.6.0, running process.versions.node in the web console gives me v6.5.0. What's going on here?

Aurora0001

This is a known issue which is caused by the serialport module using native code that is built for a different version of Node. You can read a bit more about addons here, if you're interested; they're just modules written in C/C++ that can interface with Node so the module can interface with the hardware more easily.

The solution proposed by that issue is this:

npm rebuild --runtime=electron --target=1.2.5 --disturl=https://atom.io/download/atom-shell --build-from-source

If you've not already installed electron-rebuild, that might be helpful to ensure that the rebuilding process works correctly:

npm install --save-dev electron-rebuild

even though when I run node -v it prints v6.6.0, running process.versions.node in the web console gives me v6.5.0. What's going on here?

Electron uses its own version of Node that isn't connected to your system Node installation (see the homepage to view the Node version that the latest Electron uses, or use process.versions.node, like you did in the question).

You could try an older version (perhaps 1.1.0, which uses Chrome 50?) in case that is the cause of the issue.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Electron : Module version mismatch. Expected 50, got 48

Module version mismatch with headless browser and desktop Node

Error: Metadata version mismatch for module found version 4, expected 3

Nodejs Module version mismatch. Expected 11, got 1

Error: Module version mismatch. Expected 47, got 48

Error: Module version mismatch. Expected 11, got 1

Angular :Metadata version mismatch for module src/app/app.module.ts, found version 3, expected 4

Metadata version mismatch for module /node_modules/time-ago-pipe/time-ago-pipe.d.ts, found version 4, expected 3

ERROR in Error: Metadata version mismatch for module ../node_modules/angularfire2/index.d.ts, found version 4, expected 3,

Error: Metadata version mismatch for module .../node_modules/@ngx-translate/core/core.d.ts, found version 4, expected 3

ERROR in Metadata version mismatch for module node_modules/angular-2-local-storage/dist/index.d.ts, found version 4, expected 3

Metadata version mismatch for module /node_modules/angularfire2/index.d.ts, found version 4, expected 3, resolving symbol AppModule

Node.js module version mismatch, installed with MacPorts

ERROR in Metadata version mismatch for module X found version 4, expected 3, resolving symbol Y

ERROR in Error: Metadata version mismatch for module ngx-swiper-wrapper found version 4, expected 3

Metadata version mismatch for module... found version expected 3 in ionic3

Metadata version mismatch for module , found version 4, expected 3, resolving symbol AdminModule

(React on Rails) The engine "node" is incompatible with this module. Expected version "..."

Error: Metadata version mismatch for module .../ngx-masonry/ngx-masonry.d.ts, found version 4, expected 3

Angular Material | Metadata version mismatch for module

Expected Undefined to be an object for Node Module

[AWS CodeBuild]The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "10.19.0"

Node js version mismatch between `node -v` and `brew upgrade node`

Type mismatch: connectedcompany already defined with conflicting type Any (expected Node)

error [email protected]: The engine "node" is incompatible with this module. Expected version ">=8". Ember js + Heroku Deployment

Metadata version mismatch for module while creation a browser build

mule-module-spring-config and spring bean version mismatch

Import node module conditionally based on node version

Why is there a mismatch of module versions between Electron and Node.JS?