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

Robotjs failed to load in MacOSX #57

Closed
humanely opened this issue Nov 7, 2016 · 5 comments
Closed

Robotjs failed to load in MacOSX #57

humanely opened this issue Nov 7, 2016 · 5 comments

Comments

@humanely
Copy link

humanely commented Nov 7, 2016

Hi,

This gives error to load robotjs in mac. Has anyone faced this issue?

[Error: ./robot.js failed to load]
[Error: Module version mismatch. Expected 47, got 48.]

@msakrejda
Copy link

I've seen this in other projects, generally when switching node versions without rebuilding native modules (but sometimes in other situations). Running rm -rf node_modules && npm install has always fixed it for me.

@humanely
Copy link
Author

humanely commented Nov 7, 2016

Tried that. But problem still exists. Also, as mentioned in Robotjs here but no help.

@humanely
Copy link
Author

humanely commented Nov 7, 2016

After some trials and cache cleanups, I am getting:

[Error: ./robot.js failed to load]
[Error: Module version mismatch. Expected 47, got 51.]

@mafintosh
Copy link
Collaborator

you need to build it against electron after installing, npm run rebuild, https://github.com/maxogden/screencat/blob/master/package.json#L11

@humanely
Copy link
Author

humanely commented Nov 7, 2016

At last! This solved my issue. http://electron.atom.io/docs/tutorial/using-native-node-modules/
./node_modules/.bin/electron-rebuild

@humanely humanely closed this as completed Nov 7, 2016
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

3 participants