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

Unable to Install #391

Open 0xff01WasTaken opened 2 years ago

0xff01WasTaken commented 2 years ago

Expected Behavior

npm install iohook --save works without issue

Current Behavior

npm install iohook --save gives an error, building from source also gives an error when executing "npm install"

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

Errors

npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm ERR! code 1 npm ERR! path /home/ox_admin/Documents/Projects/AutoTap/node_modules/iohook npm ERR! command failed npm ERR! command sh -c node install.js npm ERR! Downloading prebuild for platform: iohook-v0.9.1-node-v102-linux-x64 Downloading prebuild.tar.gz npm ERR! Error: GET https://github.com/wilix-team/iohook/releases/download/v0.9.1/iohook-v0.9.1-node-v102-linux-x64.tar.gz returned 404 npm ERR! Prebuild for current platform (iohook-v0.9.1-node-v102-linux-x64) not found! npm ERR! Try to build for your platform manually: npm ERR! # cd node_modules/iohook; npm ERR! # npm run build npm ERR! npm ERR! /home/ox_admin/Documents/Projects/AutoTap/node_modules/iohook/install.js:16 npm ERR! throw err; npm ERR! ^ npm ERR! npm ERR! [Error: ENOENT: no such file or directory, open '/tmp/prebuild.tar.gz'] { npm ERR! errno: -2, npm ERR! code: 'ENOENT', npm ERR! syscall: 'open', npm ERR! path: '/tmp/prebuild.tar.gz' npm ERR! } npm ERR! npm ERR! Node.js v17.6.0

npm ERR! A complete log of this run can be found in: npm ERR! /home/ox_admin/.npm/_logs/2022-03-11T06_11_49_405Z-debug-0.log

anasrar commented 2 years ago

current version of iohook binary only support for node version 10 - 15 (I forget about electron), there is some PR #363 that not merged yet.

or you can build binary manually: https://wilix-team.github.io/iohook/manual-build.html#building-for-specific-versions-of-node

since you use arch, you can use nvm https://aur.archlinux.org/packages/nvm for manage node version, easy to upgrade and downgrade.

anasrar commented 2 years ago

@0xff01WasTaken you can try this temporary solution https://github.com/anasrar/node-iohook-binary