Temporary solution for installing iohook for electron and node js due to iohook unmaintained prebuild binary for latest Electron and Node.js.
Current Version : v0.9.3
Install iohook
npm install iohook --ignore-scripts
Add few lines below to package.json
"iohook": {
"targets": [
"node-72",
"electron-85"
],
"platforms": [
"win32",
"darwin",
"linux"
],
"arches": [
"x64",
"ia32"
]
}
Change node-72
and electron-85
to fit your version node and electron on your project.
Further information on https://wilix-team.github.io/iohook/usage.html#electron
Change few lines in node_modules/iohook/install.js
From
let downloadUrl =
'https://github.com/wilix-team/iohook/releases/download/v' +
pkgVersion +
'/' +
currentPlatform +
'.tar.gz';
To
let downloadUrl =
'https://github.com/anasrar/node-iohook-binary/releases/download/ci' +
'/' +
currentPlatform +
'.tar.gz';
Run
node node_modules/iohook/install.js