Giter Club home page Giter Club logo

Comments (11)

troywarr avatar troywarr commented on July 4, 2024

It looks like this might have something to do with Node v6.x. I installed nvm and downgraded to Node v5.11.1, and now it's working fine!

from electron-johnny-five-examples.

nylki avatar nylki commented on July 4, 2024

@troywarr I can confirm that using node 5.11.1 fixed that error, interestingly.

However, for testing I tried to use a more recent electron-prebuilt version, as well.
Anything 1.0+ throws the same error (after having to modify main.js a bit to comply to the new API):

/Users/tom/gits/electron-johnny-five-examples/1-led/node_modules/bindings/bindings.js:83 Uncaught Error: Module version mismatch. Expected 48, got 47.

Version 0.37.8, the one before the 1.0 version bump works just fine though.
Any idea why that is happening? I'd like to use more recent electron versions.

from electron-johnny-five-examples.

calugo avatar calugo commented on July 4, 2024

I can confirm this issue in Linux, it appears to be related to paths, I guess the solution is to refactor the entire code piece by piece to see what is going on.

This is my error.

/home/user/electronj5/1-led/node_modules/johnny-five/node_modules/serialport/node_modules/bindings/…:83 Uncaught Error: Module version mismatch. Expected 47, got 46.

I downgraded to node 4.00 and it didn't worked, node v5.11.1 works out of the box, this is then an error associated to a dependency of original build of the app. I'm intrigued....

Regards.

from electron-johnny-five-examples.

Sparo avatar Sparo commented on July 4, 2024

Hi all,

I have the same problem:

Error: Module version mismatch. Expected 49, got 48.
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 /Projects/ElectronDevice/node_modules/bindings/bindings.js:76:44)

npm latest
node latest
johnny-five latest
"electron-prebuilt": "^1.3.1"
OS ubuntu

I was looking for this issue on all over the net, but nothing resolves this... was trying all combinations of the npm, node and johnny-five but, I guess didn't find right combination...

any idea ?

from electron-johnny-five-examples.

calugo avatar calugo commented on July 4, 2024

Yes, as the others said before just make sure you are using the same node version (5.11.1) and the standard instructions and it will work, now for a definitive solution a full step by step rebuilt of the project seems to be in order so all the dependencies are in accordance to your setup.

I will try that soon and will post the results here.

from electron-johnny-five-examples.

Sparo avatar Sparo commented on July 4, 2024

Tried installing node 5.11.1 and then rm -rf node_modules then npm installeven installed electron-rebuild and done ./node_modules/.bin/electron-rebuild... but error still persist... I am so frustrated, doing this almost 30 hours... but nothing helps ... so far...

from electron-johnny-five-examples.

calugo avatar calugo commented on July 4, 2024

Did you sourced your node version?

from electron-johnny-five-examples.

calugo avatar calugo commented on July 4, 2024

you can use this.
https://github.com/tj/n

Basically, after you install your node version and run
node -v
to check which version is actually running
then using n (link above) you can change the version to the want you want (after that you can run node -v to verify this is the case)
Once you have done that, remove, rebuild as you just did and it must work!
(That is what I did) Im running node in ubuntu 14 LTS but for mac should be the same.

from electron-johnny-five-examples.

calugo avatar calugo commented on July 4, 2024

sudo npm cache clean -f
Here we go
sudo npm install -g n
sudo n "version"
sudo ln -sf /usr/local/n/versions/node//bin/node /usr/bin/node

then rebuild and re run!

from electron-johnny-five-examples.

Sparo avatar Sparo commented on July 4, 2024

I have struggle with this some time now, and the problem was in electron version. Your solution was working perfectly for this version combination of electron and johnny-five.

this was my package.json:

{
"name": "JumpDevice",
"version": "1.0.0",
"description": "Mesuring jump distance",
"main": "app.js",
"dependencies": {},
"devDependencies": {
"electron-prebuilt": "^1.3.1",
"electron-rebuild": "^1.1.5",
"johnny-five": "^0.9.61"
},
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "electron .",
"clean": "rm -rf node_modules && npm install"
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/Sparo/electrondevice.git"
},
"keywords": [
"Jump",
"mesuring",
"ultrasound"
],
"author": "Nenad Sparic",
"license": "ISC",
"homepage": "https://bitbucket.org/Sparo/electrondevice#readme"
}

and now package.json is

{
"name": "JumpDevice",
"version": "1.0.0",
"description": "Mesuring jump distance",
"main": "app.js",
"dependencies": {
"electron-prebuilt": "^0.36.7",
"johnny-five": "^0.9.23"
},
"devDependencies": {
"electron-rebuild": "^1.1.3"
},
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "electron .",
"clean": "rm -rf node_modules && npm cache clean -f && npm install"
},
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/Sparo/electrondevice.git"
},
"keywords": [
"Jump",
"mesuring",
"ultrasound"
],
"author": "Nenad Sparic",
"license": "ISC",
"homepage": "https://bitbucket.org/Sparo/electrondevice#readme"
}

I hope there will be a moment that I could go into the newer version of electron...definitely, this is a super tool for cross-OS application.

from electron-johnny-five-examples.

nlemoine avatar nlemoine commented on July 4, 2024

The issue here isn't related to johnny-five, the main problem comes from node-serialport. You will find some workarounds here: serialport/node-serialport#538

from electron-johnny-five-examples.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.