-
-
Notifications
You must be signed in to change notification settings - Fork 999
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 #904
Comments
And 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 P |
You're looking for electron-rebuild the version of "node" it uses doesn't On Thu, Aug 11, 2016, 6:03 PM styoe notifications@github.com wrote:
|
But i tried many versions of electron-rebuild and electron... none of them worked. Are you telling me it cannot be solved? |
It very much can be solved and many people have figured a way to do it. But On Thu, Aug 11, 2016, 6:12 PM styoe notifications@github.com wrote:
|
Thank you, i will. Is there nothing else i can do? and can you pls, if you have the time :) explain why can't i modify the serialport module somehow to use the same version of node as my electron app? As no other modules i am using are having this problem... |
npm uses one version of node to download or compile the serialport binary and electron uses a different version to run it. You need to get electron to build the binary and then you're set. |
electron/rebuild#97 |
juliangruber/require-rebuild#12 |
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 |
great! |
@styoe thanks so much :) |
Hi, is there any chance any of you would be able to take a look at a similar issue but for NodeJS on Ubuntu x64? I would really appreciate it! The issue is here: #964 |
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:
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)
Please help me solve this,
Thanks in advance
The text was updated successfully, but these errors were encountered: