-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
Switch from robotjs to libnut #86
Comments
Happy to have found nut.js. Any updates on when this will be merged? |
Hi @AdrianoFerrari, with the new LTS version of node (lts/erbium), I'm about to release a new version of nut.js quite soon (next week-ish). I'm just currently finishing up on some other tasks. For now @nut-tree/libnut is basically an N-API port of robotjs with minor changes from my side. May I ask which issues have you been dealing with? |
@AdrianoFerrari I published nut.js v1.3.1 today which closes this issue. |
Thanks, seems to install properly now on Travis for macOS and linux. Sorry I can't pinpoint what the issue was with robotjs vs libnut. Quick reading shows me that it's possible that robotjs was expecting an older JS engine (I remember the errors having something to do with "V8")... Anyway, installs now 👍 (still having issues getting it to send keyboard commands on macOS on Travis, but that's very likely something I'm doing wrong... will keep at it). |
@AdrianoFerrari Happy to hear! 👍 robotjs only provides prebuilt bindings up until node 8, so this might be causing errors in case a manual rebuild fails. libnut relies on N-API bindings which are compatible with any node major version >= 10 without recompiling. Regarding errors on Travis: You might check which macOS version is used for the build. In recent versions of macOS (not 100% sure, but it might be Sierra and later) you have to explicitly grant accessibility rights to send e.g. keyboard events. On CI this might cause trouble. |
You're right, macOS version seems to be the issue. This build fails, with macOS macOS 10.14 ( This build succeeds, with macOS macOS 10.13 ( I'll post back if I find a workaround for newer macOS versions, but isn't looking promising so far... |
Short overview
Currently nut.js uses octalmage/robotjs, a nan module. For easier support of multiple node versions, our N-API port should be elaborated.
Use case
Easier support for multiple node modules without recompiling the native module.
Detailed description
In @nut-tree/libnut, octalmage/robotjs has been ported to N-API, which allows to use it with any node version >= 10 without having to recompile the native module.
The text was updated successfully, but these errors were encountered: