-
Notifications
You must be signed in to change notification settings - Fork 175
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
Electron and serialport on raspberry pi 3, Module version missmatch error #97
Comments
@styoe This means you need to force a rebuild. You can do this by setting How are you calling |
I tried exclusively from cli, using various options, you think that might be the problem? |
Have you tried the https://github.com/electron/electron-rebuild/blob/master/src/cli.js#L27 |
Yes, but i dont think the problem is there, it's in the versions of node missmatch if i am not mistaken, no? So i installed node-prebuilt and serialport, then i tried node rebuild, still the same... then i tried using node-gyp with various commands on node-serialport, still the same. then i tried rebuilding electron, still the same. |
@styoe The issue you are seeing (as far as I am concerned) it that As such it downloads the binary for your current node version which is why you saw the number increase as you increase node versions. You can force it to build from source using the |
Ok, thank you. I think i already tried that but will try again in a few hours, and report the result |
ok, i tried node_modules/.bin/electron-rebuild -f -w serialport -p , no luck i also tried positioning in node_modules/serialport and running node-pre-gyp install --build-from-source and with no luck. Funny thing is, electron-rebuild provides no console output even though my logging level is set to silly. Another thing, before rebuilding the error was thrown in ../serialport/node-modules...bindings.js and now it is thrown at (/home/pi/eres-one/app/node_modules/bindings/bindings.js:77:44 |
i am running out of ideas here |
Allright! i managed to get it working by running sudo npm rebuild --runtime=electron --target=1.2.5 --disturl=https://atom.io/download/atom-shell --build-from-source |
@styoe do you solve this problem?,my Serialport module is success ,but node-usb module has zhe same problem, |
@styoe I didn't see your last reply. I try run |
Np mate |
Appears to be resolved now |
Python: 2.7.9
Serialport: 3.8.6
electron prebuilt: 3.8.6
raspberry 3 linux 4.4.16-v7+
Node: 5.12.0
npm: 3.8.6
I cannot get the app to run without the Module version missmatch error. I followed a bunch of tutorials here, suggesting rebuilding the module, changing node & npm & electron versions, and so far i have managed to change the error from:
"Expected 49, got 46" to "Expected 49, got 47" to "Expected 49, got 48".
Do you please have any more ideas, or point me in the right direction as i am clueless by now.
I tried clearing the npm cache, rebuilding all modules, rebuilding just serialport, deleting node modules and reinstalling them. Using node-gyp to rebuild the binaries... I think i tried every solution out there.
So far, by logging the line before the line that breaks in the node_modules/bindings/bindings.js have managed to isolate the problem ( i think ) to serialport/dist/Release/serialport.node
Here is the log:
eres-one@1.0.0 start /home/pi/eres-one/app
electron main.js
MY LOG
/home/pi/eres-one/app/node_modules/serialport/build/serialport.node
/home/pi/eres-one/app/node_modules/serialport/build/Debug/serialport.node
/home/pi/eres-one/app/node_modules/serialport/build/Release/serialport.node
END MY LOG
App threw an error during load
Error: Module version mismatch. Expected 49, got 47.
at Error (native)
at process.module.(anonymous function) as dlopen
at Object.Module._extensions..node (module.js:568:18)
at Object.module.(anonymous function) as .node
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at bindings (/home/pi/eres-one/app/node_modules/bindings/bindings.js:77:44)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Module version mismatch. Expected 49, got 47.
at Error (native)
at process.module.(anonymous function) as dlopen
at Object.Module._extensions..node (module.js:568:18)
at Object.module.(anonymous function) as .node
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at bindings (/home/pi/eres-one/app/node_modules/bindings/bindings.js:77:44)
The 46, 47, 48 versions i managed to get correlate to the node versions i installed.
46 for node < 4, 47 for node 5.* and 48 for node 6.*
The problem is that it is still 48 for the latest node arm build, and as far as i can see. te official page states
Version LTS Date V8 npm NODE_MODULE_VERSION[1]
Node.js v6.3.1 2016-07-21 5.0.71.57 3.10.3 48
https://nodejs.org/en/download/releases/
Please help me solve this,
Thanks in advance
The text was updated successfully, but these errors were encountered: