-
Notifications
You must be signed in to change notification settings - Fork 291
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
iohook build different node js version #420
Comments
I just spent 2 days trying to do the same. Here is the fix for your issue: https://www.electronjs.org/docs/latest/tutorial/using-native-node-modules follow the 3rd code block instructions (the one with export commands). Apply all of these (the first export is the ELECTRON version). npm run build will do the job or you can use electron-rebuild. Both work. You might run into an issue relating to the NAN libary, this is a known bug and the patch is out there. Once you patch it, it builds correctly (google the error). I have a working build for Mac & Linux for electron 22.1.0 (ABI 110) in combination with Node 16.18.1 The error you are seeing is because the npm is not setup correctly and its linking against the node, it needs the electron. |
Hello @nightincode , thank you very much! I will try it. |
@nightincode do you mind sharing the prebuilt .tar.gz file if you have it by any chance? I'm using your approach but it isn't really working for a project with Electron 22. |
What os/version?
…On Tue, Jun 13, 2023, 11:16 a.m. Haris Muhibic ***@***.***> wrote:
@nightincode <https://github.com/nightincode> do you mind sharing the
prebuilt .tar.gz file if you have it by any chance? I'm using your approach
but it isn't really working for a project with Electron 22.
—
Reply to this email directly, view it on GitHub
<#420 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARYH2ZIU5CRJR5YF5KM4T5DXLB73HANCNFSM6AAAAAATJC6OXE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@nightincode MacOS 13.4 (22F66) with ARM64 M1, version 22.0.0, ABI 110 (darwin-arm64) |
@nightincode iohook 0.9.3 |
here you go buddy :) for linux/windows/mac all tested https://github.com/nightincode/iohook-bins/blob/main/prebuild_libs.zip (Also includes patched source) |
@nightincode hvala :) you have saved my life with this 😄 |
Next time you have an issue like this, try my ChatGPT powered plugin to help you solve your issue: shuto.io (now available on the chatGPT plugin store)! You are welcome 👍 |
@nightincode do you have an ARM64 prebuilt version perhaps? getting the following with this: |
You have arm based cpu, you need to rebuild it with the source that is there |
The source code for mac (the patched mac version) is now also available as a zip in the same repo |
Hi @nightincode, can you be a bit more specific than "google the issue"? I've downloaded your repo and I'm able to build a node v18 version, but can't figure out getting Electron 25 for windows and mac to build. I'm on Windows 11 and followed the docs, but still can't figure it out.
Adding a package.json override to patch the AccessorSignature bug creates that error, and I can't build electron still. Any help would be greatly appreciated. |
@ferothefox I used the code @nightincode provided to patch iohook and create a new repo that works well with Electron 22 and Node 18: https://github.com/Droplr/iohook-v2. Hope you are able to do the same for 25 on your machine. |
@harismuha123 Hey Haris, yes, I was able to get it to work on Electron 25! I have a repo here, complete with cross platform builds powered by GitHub Actions. I might retroactively build all of the other major versions, but for now this works for my purposes. The repo is here https://github.com/robolab-io/iohook For anyone seeing this in the future, if you need a version of iohook built for Electron 25 and Node 18, please check out this release: https://github.com/robolab-io/iohook/releases/tag/v0.9.8 |
I built the iohook repo and used it in a electron app ending with this issue:
NODE_MODULE_VERSION 93. This version of Node.js requires NODE_MODULE_VERSION 107. Please try re-compiling or re-installing
I am using Electron version: 20.3.7 and Node js version: 16.15.0. I built the iohook with node js version 16.15.0. As I understood, there is no electron version with node_module_version 93, or a node js module version 107. Is there a workaround?
Thanks.
The text was updated successfully, but these errors were encountered: