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

Couldn't install iohook in my electron app #441

Open sachinsrinivas12 opened 10 months ago

sachinsrinivas12 commented 10 months ago

npm WARN cleanup Failed to remove some directories [ npm WARN cleanup [ npm WARN cleanup 'C:\appDev\catalyst-electronjs-agent\node_modules\app-builder-lib', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\appDev\catalyst-electronjs-agent\node_modules\app-builder-lib\templates'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\appDev\catalyst-electronjs-agent\node_modules\app-builder-lib\templates' npm WARN cleanup } npm WARN cleanup ], npm WARN cleanup [ npm WARN cleanup 'C:\appDev\catalyst-electronjs-agent\node_modules\getmac', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\appDev\catalyst-electronjs-agent\node_modules\getmac\node_modules\@types\node\ts4.8\dns'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\appDev\catalyst-electronjs-agent\node_modules\getmac\node_modules\@types\node\ts4.8\dns' npm WARN cleanup } npm WARN cleanup ], npm WARN cleanup [ npm WARN cleanup 'C:\appDev\catalyst-electronjs-agent\node_modules\axios', npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\appDev\catalyst-electronjs-agent\node_modules\axios'] { npm WARN cleanup errno: -4048, npm WARN cleanup code: 'EPERM', npm WARN cleanup syscall: 'rmdir', npm WARN cleanup path: 'C:\appDev\catalyst-electronjs-agent\node_modules\axios' npm WARN cleanup } npm WARN cleanup ] npm WARN cleanup ] npm ERR! code 1 npm ERR! path C:\appDev\catalyst-electronjs-agent\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-v120-win32-x64
npm ERR! Downloading prebuild.tar.gz
Downloading prebuild.tar.gz
npm ERR! Error: GET https://github.com/wilix-team/iohook/releases/download/v0.9.3/iohook-v0.9.3-node-v120-win32-x64.tar.gz returned 404 npm ERR! (node:26996) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. npm ERR! (Use node --trace-deprecation ... to show where the warning was created) npm ERR! Prebuild for current platform (iohook-v0.9.3-node-v120-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:\appDev\catalyst-electronjs-agent\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\SACHIN~1.SRI\AppData\Local\Temp\prebuild.tar.gz'] {
npm ERR! errno: -4058, npm ERR! code: 'ENOENT', npm ERR! syscall: 'open', npm ERR! path: 'C:\Users\SACHIN~1.SRI\AppData\Local\Temp\prebuild.tar.gz'
npm ERR! } npm ERR! npm ERR! Node.js v21.4.0

npm ERR! A complete log of this run can be found in: C:\Users\sachin.srinivas\AppData\Local\npm-cache_logs\2024-01-22T11_47_59_629Z-debug-0.log

harshprajapati4225 commented 10 months ago

you need to add some config in pakage.json in order to install.

thamizh-qwerty commented 9 months ago

npm ERR! Error: GET https://github.com/wilix-team/iohook/releases/download/v0.9.3/iohook-v0.9.3-node-v120-win32-x64.tar.gz returned 404

this line from your log means there is no prebuilt for this specific version. you need to build them manually. These are the available prebuilt versions. And, these is how we should generate manual build.

iohook's nodegyp@latest configuration works fine on linux, not on windows. check this. . also check the releases of this repo.

@WilixLead @lacymorrow there is lot of 'could not install' issues. can we have some explanation regarding this in readme.md.

lacymorrow commented 9 months ago

I'd be up to merge any PR's to improve the documentation or add more prebuilt binaries!