Closed nmilev-scribe closed 2 years ago
The manual build instructions are a bit misleading, see #380. You need to make sure to clone the whole iohook repo not just npm install
it otherwise you won't have all the needed build assets, you need the contents of the iohook/libuiohook folder.
Also, I believe you'll need to specify the Electron version and ABI with the build
command, I don't think you can rely on it autodetecting an unofficially supported target (note in your quoted output it says Building iohook for electron v12.0.0
, not sure where it's getting v12 from). If you're targeting Electron 18 then it would be node build.js --runtime electron --version 18.0.4 --abi 103 --upload=false
I've successfully built iohook for darwin arm64 for Electron 13 but I haven't tried later Electron versions so I can't guarantee it will work 🤷♂️
Since you're using electron 18, you may want to clone PR #363 instead.
@jove0610 It turns out I am using electron 12, but thanks. @marcelblum I followed your help and managed to build. Needed to copy the build dir into iohook directory inside node_modules, but it all works great. Thanks for the help!
I read somewhere that the docs can be improved, and I absolutely agree. Other than that, it was quick and painless.
Since I solved my issue, closing this.
@nmilev-scribe How did you solve it on m1 mac? Can you plz explain it step by step?
Expected Behavior
Navigating into
node_modules/iohook
, runningnpm install
and thennpm run build
builds iohook for thearm64
platformCurrent Behavior
The
npm install
command passes with the following output:The
npm run build
command fails with the following output:Trying with
yarn
produced the same results.Possible Solution
Steps to Reproduce (for bugs)
Context
Trying to run a development version of our Electron app is not possible on M1.
Your Environment
0.9.3
Electron 18.0.4
macOS Monterey 12.3.1