Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install/build iohook 0.9.3 #379

Open
GHKazza opened this issue Feb 5, 2022 · 6 comments
Open

Can't install/build iohook 0.9.3 #379

GHKazza opened this issue Feb 5, 2022 · 6 comments

Comments

@GHKazza
Copy link

GHKazza commented Feb 5, 2022

Expected Behavior

Correct installation

Current Behavior

Installing

npm install iohook --save

npm ERR! code 1
npm ERR! path C:\...\Project\node_modules\iohook
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! Downloading prebuild for platform: iohook-v0.9.3-node-v102-win32-x64
Downloading prebuild.tar.gz
npm ERR! Error: GET https://github.com/wilix-team/iohook/releases/download/v0.9.3/iohook-v0.9.3-node-v102-win32-x64.tar.gz returned 404
npm ERR! Prebuild for current platform (iohook-v0.9.3-node-v102-win32-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! C:\...\Project\node_modules\iohook\install.js:16
npm ERR!   throw err;
npm ERR!   ^
npm ERR!
npm ERR! [Error: ENOENT: no such file or directory, open 'C:\Users\ADMINI~1\AppData\Local\Temp\prebuild.tar.gz'] {
npm ERR!   errno: -4058,
npm ERR!   code: 'ENOENT',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\prebuild.tar.gz'
npm ERR! }
npm ERR!
npm ERR! Node.js v17.4.0

npm ERR! A complete log of this run can be found in:
npm ERR!     AppData\Local\npm-cache\_logs\2022-02-05T07_56_19_898Z-debug.log

Building

> [email protected] build
> node build.js --upload=false

Building iohook for node v17.4.0>>>>
node:events:498
      throw er; // Unhandled 'error' event
      ^

Error: spawn C:\...\Project\node_modules\iohook\node_modules\.bin\node-gyp.cmd ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:476:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn C:\\...\\Project\\node_modules\\iohook\\node_modules\\.bin\\node-gyp.cmd',
  path: 'C:\\...\\Project\\node_modules\\.bin\\node-gyp.cmd',
  spawnargs: [
    'configure',
    'rebuild',
    '--target=17.4.0',
    '--arch=x64',
    '--v8_enable_pointer_compression=1',
    '--msvs_version=2017'
  ]
}

Node.js v17.4.0

Possible Solution

I would like to know

Steps to Reproduce (for bugs)

npm install iohook --save
npm run build

Context

I want to install iohook

Your Environment

  • IOHook Version: 0.9.3
  • Environment name and version (e.g. Chrome 39, node.js 5.4, electron 11.2): Chrome 98, node,js 17.4.0, electron 16.0.7
  • Operating System and version (desktop or mobile): Windows 10 64-bit
@marcelblum
Copy link
Contributor

The instructions are a little unclear, to manually build for now you must manually clone the full iohook repo, then npm install and npm run build. You can then copy the built binaries into your project's own node_modules/iohook/builds.

@GHKazza
Copy link
Author

GHKazza commented Feb 6, 2022

@marcelblum Ok, with npm run build it successfully compiles the build node-v102-win32-x64, but exactly what I want is the build electron-v99-win32-x64.

I am trying to use the following command node build.js --runtime electron --version 16.0.7 --abi 99 from the Manual Build document in the repository and I am getting the following error:

Building iohook for electron v16.0.7>>>>
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info find Python using Python version 3.10.2 found at "C:\Python310\python.exe"
gyp info find VS using VS2017 (15.9.28307.1778) found at:
gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
gyp info find VS run with --verbose for detailed information
(node:10884) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
gyp info spawn C:\Python310\python.exe
gyp info spawn args [
gyp info spawn args   'C:\\Users\\Administrator\\Documents\\PersonalProject\\node_modules\\iohook\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Administrator\\Documents\\PersonalProject\\node_modules\\iohook\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Administrator\\Documents\\PersonalProject\\node_modules\\iohook\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\Administrator\\AppData\\Local\\node-gyp\\Cache\\16.0.7\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\Administrator\\AppData\\Local\\node-gyp\\Cache\\16.0.7',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Administrator\\Documents\\PersonalProject\\node_modules\\iohook\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.0.7\\\\<(target_arch)\\\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Administrator\\Documents\\PersonalProject\\node_modules\\iohook',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\Administrator\\Documents\\PersonalProject\\node_modules\\iohook\\build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp: name 'openssl_fips' is not defined while evaluating condition 'openssl_fips != ""' in binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\Administrator\Documents\PersonalProject\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (node:events:520:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Windows_NT 10.0.19044
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\Documents\\PersonalProject\\node_modules\\iohook\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "rebuild" "--target=16.0.7" "--arch=x64" "--dist-url=https://atom.io/download/electron" "--v8_enable_pointer_compression=1" "--msvs_version=2017"
gyp ERR! cwd C:\Users\Administrator\Documents\PersonalProject\node_modules\iohook
gyp ERR! node -v v17.4.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
Error: Failed to build...
    at ChildProcess.<anonymous> (C:\Users\Administrator\Documents\PersonalProject\node_modules\iohook\build.js:188:23)

I'm skipping something?

@marcelblum
Copy link
Contributor

Hmm possibly related to nodejs/node-gyp#2534 looks like some kind of Node version conflict. I can build manually without this openssl_fips error on Windows 10 with Node 14.17.6, FWIW. Maybe try downgrading your Node version to latest LTS version 16.x.x?

@GHKazza
Copy link
Author

GHKazza commented Feb 7, 2022

Thanks to you, I was finally able to successfully build electron-v99-win32-x64, I hope I won't have any problems having Node v16.13.2 LTS instead of Node v17.4.0, thanks!

@LiamKarlMitchell
Copy link

Same here, I'll try cloning repo, building it and copying.
npm ERR! Error: GET https://github.com/wilix-team/iohook/releases/download/v0.9.3/iohook-v0.9.3-node-v93-win32-x64.tar.gz returned 404
npm ERR! Prebuild for current platform (iohook-v0.9.3-node-v93-win32-x64) not found!
npm ERR! Try to build for your platform manually:

@LiamKarlMitchell
Copy link

LiamKarlMitchell commented Jul 21, 2022

Got it built but it has an error about Could not find Keyboard Map.
Ran as admin as well just in-case.

Tried on USA and NZ keyboard languages.

PS C:\dev\ddcci\node> node main
refresh_locale_list [476]: GetKeyboardLayoutList(0, NULL) found 3 layouts.
refresh_locale_list [493]: Received 3 locales.
get_keyboard_layout_file [455]: RegOpenKeyEx failed to open key: "SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001409"!
refresh_locale_list [634]: Could not find keyboard map for locale 0000000004090409!
load_input_helper [866]: refresh_locale_list() found 2 locale(s).

#58

Added missing registry key? (Weird because I have the language/keyboard installed)
00001409

But still no luck it closes process after it says found 3 locale(s)

node main
refresh_locale_list [476]: GetKeyboardLayoutList(0, NULL) found 3 layouts.
refresh_locale_list [493]: Received 3 locales.
load_input_helper [866]: refresh_locale_list() found 3 locale(s).

Keyboard Layouts NZ Maori 00001409.reg

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00001409]
"Layout Display Name"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,\
  52,00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,\
  00,32,00,5c,00,69,00,6e,00,70,00,75,00,74,00,2e,00,64,00,6c,00,6c,00,2c,00,\
  2d,00,35,00,32,00,35,00,33,00,00,00
"Layout File"="KBDMAORI.DLL"
"Layout Text"="NZ Aotearoa"

Still crashes on requiring the module, also kind of odd that it outputs to console output without being told to by listening to an event of some sort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants