Skip to content
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

Uncaught Error: module version mismatch. Expected 50, got 48. bindings.js #5

Closed
nickstew opened this issue Sep 27, 2016 · 4 comments
Closed
Assignees
Labels

Comments

@nickstew
Copy link
Contributor

nickstew commented Sep 27, 2016

Issue

screen shot 2016-09-27 at 8 07 45 am

## Investigation

This issue lies somewhere between electron and serialport. Thanks to #1204 and this comment, I was able to come up with a solution for this problem. I hope this leads you in the right direction.

Solution Steps

Install node-gyp Globally

I did this to make it easier to reference later when we rebuild serialport with it.

  npm install -g node-gyp

Change Directory to where serialport is in your project

node-gyp is going to use the current directory for which module to rebuild.

  cd `npm ls serialport --parseable`

Rebuild serialport

This is mostly taken from that issue comment linked above.

I assume that we need to reference ~/.electron-gyp so that it uses the electron version as the targeted version instead of using an electron version number to target a specific version of node.

I added the dynamic target so that as electron gets updated you won't have to change this line.

  HOME=~/.electron-gyp node-gyp rebuild --target=`npm view electron version` --arch=x64 --dist http://atom.io/download/atom-shell

Done!

After that you should be good to navigate back to the root of your project and run it.

Obligatory Version Table and Disclaimer

OS node npm electron johnny-five serialport
OSX 10.11.6 6.3.1 2.11.3 1.4.1 0.10.1 4.0.1

Disclaimer: I have only verified that it works on my machine and have not tried Windows or Linux operating systems.

@lukeorland
Copy link
Contributor

I followed these instructions and was successful, in that I didn't get the "Module version mismatch" exception. However, I couldn't figure out how to use the UI to get a race running.

@nickstew
Copy link
Contributor Author

nickstew commented Oct 6, 2016

@lukeorland have you tried going to the race screen? The hardware should connect once you're on that screen and you should be able to see the lights change if you trigger the sensors.

@taktran
Copy link

taktran commented Oct 19, 2016

I had this issue with xpc-connection for bluetooth, and worked amazingly! Thanks!

@taktran
Copy link

taktran commented Oct 19, 2016

Actually using electron-rebuild seems to fix the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants