iohook
iohook copied to clipboard
Cannot find module undefined
trafficstars
I'm getting an error when attempting to include iohook in my application. I'm using Electron + Create React App. It's an existing application that I'm trying to add a feature to.
Expected Behavior
Package imported, and able to be used.
Current Behavior
I receive a React error message that says:
Error: Cannot find module '/builds/node-vundefined-undefined-undefined/build/Release/iohook.node'
Steps to Reproduce (for bugs)
const ioHook = require('iohook');
"iohook": {
"targets": [
"node-88",
"electron-85"
],
"platforms": [
"win32",
"darwin",
"linux"
],
"arches": [
"x64",
"ia32"
]
}
Context
Just trying to bring in the library so that I can track mouse events (move and click) outside of the Electron windows that I'm showing.
Your Environment
package.json
"electron": "^11.1.1",
"iohook": "^0.9.3",
node_modules/iohook/builds ls -al
total 0
drwxr-xr-x 12 robin staff 384 25 Aug 11:42 .
drwxr-xr-x 17 robin staff 544 25 Aug 12:04 ..
drwxr-xr-x 3 robin staff 96 25 Aug 11:42 electron-v85-darwin-x64
drwxr-xr-x 3 robin staff 96 25 Aug 11:42 electron-v85-linux-ia32
drwxr-xr-x 3 robin staff 96 25 Aug 11:42 electron-v85-linux-x64
drwxr-xr-x 3 robin staff 96 25 Aug 11:42 electron-v85-win32-ia32
drwxr-xr-x 3 robin staff 96 25 Aug 11:41 electron-v85-win32-x64
drwxr-xr-x 3 robin staff 96 25 Aug 11:41 node-v88-darwin-x64
drwxr-xr-x 3 robin staff 96 25 Aug 11:41 node-v88-linux-ia32
drwxr-xr-x 3 robin staff 96 25 Aug 11:41 node-v88-linux-x64
drwxr-xr-x 3 robin staff 96 25 Aug 11:41 node-v88-win32-ia32
drwxr-xr-x 3 robin staff 96 25 Aug 11:41 node-v88-win32-x64
- IOHook Version: 0.9.3
- Environment name and version: Node v15.4.0, Electron 11.4.1
- Operating System and version (desktop or mobile): Mac OS Big Sur 11.5.2 (20G95)