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

Cannot install on Ubuntu 18.04 and NodeJS v12.14.0 #208

Closed ArturJS closed 4 years ago

ArturJS commented 4 years ago

Expected Behavior

It should be correctly installed via npm intall iohook

Current Behavior

Unable to install it and getting the following error:

CMake Error: Cannot determine link language for target "uiohook".
CMake Error: CMake can not determine linker language for target: uiohook

Possible Solution

I had to downgrade to node v8.16.0 in order to fix it.

Steps to Reproduce (for bugs)

  1. Use ubuntu 18.04 and node v12.14.0
  2. npm install iohook

Context

Tried the solution from https://github.com/wilix-team/iohook/issues/15 but it didn't work out. Got the error

1 verbose cli [
1 verbose cli   '/home/arturjs/.nvm/versions/node/v12.14.0/bin/node',
1 verbose cli   '/home/arturjs/.nvm/versions/node/v12.14.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.14.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle iohook@0.4.6~prebuild: iohook@0.4.6
6 info lifecycle iohook@0.4.6~build: iohook@0.4.6
7 verbose lifecycle iohook@0.4.6~build: unsafe-perm in lifecycle true
8 verbose lifecycle iohook@0.4.6~build: PATH: /home/arturjs/.nvm/versions/node/v12.14.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/arturjs/repositories/mail-client/node_modules/iohook/node_modules/.bin:/home/arturjs/repositories/mail-client/node_modules/.bin:/home/arturjs/.nvm/versions/node/v12.14.0/bin:/home/arturjs/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle iohook@0.4.6~build: CWD: /home/arturjs/repositories/mail-client/node_modules/iohook
10 silly lifecycle iohook@0.4.6~build: Args: [ '-c', 'cmake-js compile' ]
11 silly lifecycle iohook@0.4.6~build: Returned: code: 1  signal: null
12 info lifecycle iohook@0.4.6~build: Failed to exec build script
13 verbose stack Error: iohook@0.4.6 build: `npx cmake-js compile`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/home/arturjs/.nvm/versions/node/v12.14.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:210:5)
13 verbose stack     at ChildProcess.<anonymous> (/home/arturjs/.nvm/versions/node/v12.14.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:210:5)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid iohook@0.4.6
15 verbose cwd /home/arturjs/repositories/mail-client/node_modules/iohook
16 verbose Linux 5.0.0-37-generic
17 verbose argv "/home/arturjs/.nvm/versions/node/v12.14.0/bin/node" "/home/arturjs/.nvm/versions/node/v12.14.0/bin/npm" "run" "build"
18 verbose node v12.14.0
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error iohook@0.4.6 build: `npx cmake-js compile`
22 error Exit status 1
23 error Failed at the iohook@0.4.6 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Your Environment

$ uname -a
Linux arturjs 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ArturJS commented 4 years ago

@egantz friendly ping) Eagerly waiting for the brightest future for this project!

R-Bower commented 4 years ago

I'm also having installation troubles on Ubnutu 19.04, NodeJS 13.6.0

ArturJS commented 4 years ago

I'm also having installation troubles on Ubnutu 19.04, NodeJS 13.6.0

Just out of curiosity, did you try the temporal solution that I've mentioned above? If it wouldn't work out I can try to find another workaround for your case.

R-Bower commented 4 years ago

I'm also having installation troubles on Ubnutu 19.04, NodeJS 13.6.0

Just out of curiosity, did you try the temporal solution that I've mentioned above? If it wouldn't work out I can try to find another workaround for your case.

I'm not willing to downgrade to v8 just to use this. Thanks though!

Djiit commented 4 years ago

Hey, It seems you re using a very old version. Can you try with version 0.6.2 or 0.6.3 ?

ArturJS commented 4 years ago

Hey, It seems you re using a very old version. Can you try with version 0.6.2 or 0.6.3 ?

Hmm, yes that's exactly so as I didn't perform any updates on my project. Omg, sorry for such a silly issue... And thanks a lot for pointing this out!

Djiit commented 4 years ago

My pleasure !