wilix-team / iohook

Node.js global keyboard and mouse listener.
https://wilix-team.github.io/iohook
MIT License
1.2k stars 291 forks source link

npm install fails on 0.7.2 using example config in package.json #286

Closed cshipman closed 3 years ago

cshipman commented 3 years ago

Using the config from your example on https://wilix-team.github.io/iohook/usage.html no longer works on version 0.7.2. Since there is no longer a pre-built package for 32bit linux, the yarn install for my project fails with

`yarn install v1.22.4 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... warning " > electron-main-window@1.0.4" has incorrect peer dependency "electron@^2.0.0 || ^3.0.0 || ^4.0.0". warning " > electron-redux@1.5.3" has incorrect peer dependency "redux@^4.0.1". warning " > leaflet.markercluster@1.4.1" has incorrect peer dependency "leaflet@~1.3.1". warning " > redux-persist@6.0.0" has incorrect peer dependency "redux@>4.0.0". warning " > slick-carousel@1.8.1" has unmet peer dependency "jquery@>=1.8.0". warning " > eslint-config-esnext@4.1.0" has incorrect peer dependency "eslint@^6.0.0". [4/4] 🔨 Building fresh packages... [6/16] ⠈ iohook [7/16] ⠈ keyboard-layout [11/16] ⠈ @sentry/cli [4/16] ⠈ fsevents error /Users/someusername/code/ice-desktop/node_modules/iohook: Command failed. Exit code: 1 Command: node install.js Arguments: Directory: /Users/someusername/code/ice-desktop/node_modules/iohook Output: node 72 win32 x64 Downloading prebuild for platform: iohook-v0.7.2-node-v72-win32-x64 Downloading prebuild.tar.gz [============================================>] 100.0% of 153.68 kB (153.68 kB/s) Downloading prebuild.tar.gz [============================================>] 100.0% of 134.3 kB (134.3 kB/s) Downloading prebuild.tar.gz [============================================>] 100.0% of 26.18 kB (26.18 kB/s) Downloading prebuild.tar.gz [============================================>] 100.0% of 34.37 kB (34.37 kB/s) Downloading prebuild.tar.gz Error: GET https://github.com/wilix-team/iohook/releases/download/v0.7.2/iohook-v0.7.2-node-v72-linux-ia32.tar.gz returned 404 Prebuild for current platform (iohook-v0.7.2-node-v72-linux-ia32) not found! Try to compile for your platform:

cd node_modules/iohook;

npm run compile

/Users/someusername/code/ice-desktop/node_modules/iohook/install.js:15 throw err;`

Expected Behavior

yarn install should complete successfully, even if there isn't a pre-built 32bit linux package (maybe throw warning instead)

Current Behavior

See above error

Possible Solution

Update the iohook config structure so you can specify arches per platform instead of separately and forming a cartesian join between the two

Your Environment

"iohook": { "targets": [ "node-72", "electron-85" ], "platforms": [ "win32", "darwin", "linux" ], "arches": [ "x64", "ia32" ] },

hemanth500apps commented 3 years ago

Same issue ,how can we slove it

brijcodeclouds commented 3 years ago

I am also facing the same issue

WilixLead commented 3 years ago

Please review the updated docs here https://wilix-team.github.io/iohook/usage.html#usage-with-electron