iohook icon indicating copy to clipboard operation
iohook copied to clipboard

Unable to Install

Open 0xff01WasTaken opened this issue 3 years ago • 2 comments
trafficstars

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)

Context

Your Environment

  • IOHook Version: 0.9.3
  • Environment name and version (e.g. Chrome 39, node.js 5.4, electron 11.2): nodejs v17.6.0
  • Operating System and version (desktop or mobile): Arch Linux 64 bit

Errors

npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: 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 [email protected]: 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

0xff01WasTaken avatar Mar 11 '22 06:03 0xff01WasTaken

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 avatar Mar 11 '22 12:03 anasrar

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

anasrar avatar Mar 12 '22 04:03 anasrar