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

Error: Module version mismatch. Expected 50, got 48.module (Electron) #22

Closed
philipptrenz opened this issue Oct 23, 2016 · 1 comment
Closed

Comments

@philipptrenz
Copy link

philipptrenz commented Oct 23, 2016

I've want to use rpi-gpio within electron and got the following error, I figured out that it's an issue of epoll. Would be very thankful for any help!

bindings.js:83 Uncaught Error: Module version mismatch. Expected 50, got 48.module.(anonymous function) @ ELECTRON_ASAR.js:168Module._extensions..node @ module.js:583module.(anonymous function) @ ELECTRON_ASAR.js:168Module.load @ module.js:473tryModuleLoad @ module.js:432Module._load @ module.js:424Module.require @ module.js:483require @ internal/module.js:20bindings @ bindings.js:76(anonymous function) @ epoll.js:1Module._compile @ module.js:556require.extensions.(anonymous function) @ require-hook.js:17Module.load @ module.js:473tryModuleLoad @ module.js:432Module._load @ module.js:424Module.require @ module.js:483require @ internal/module.js:20(anonymous function) @ rpi-gpio.js:6Module._compile @ module.js:556require.extensions.(anonymous function) @ require-hook.js:17Module.load @ module.js:473tryModuleLoad @ module.js:432Module._load @ module.js:424Module.require @ module.js:483require @ internal/module.js:20(anonymous function) @ index.html:inline_0.js:26

@philipptrenz
Copy link
Author

Could figure out where the problem came from:
Electron has it's on gyp, so the versioning broke. Using the native Node modules inside Electron works as follows:

npm install --save-dev electron-rebuild

# Every time you run "npm install", run this:
./node_modules/.bin/electron-rebuild

# On Windows if you have trouble, try:
.\node_modules\.bin\electron-rebuild.cmd

See: https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md#the-easy-way

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

No branches or pull requests

1 participant