at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
at Module._load (internal/modules/cjs/loader.js:732:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (C:\Users\Matheus Prado\projects\personal\electron-quick-start\node_modules\iohook\index.js:24:21)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
Possible Solution
Improve the way the path is formed, or explain some things better. I tried changing the folder name and then the error changed, saying you had node_module V 89 and the plugin needed V 83 and I just didn't understand what that meant.
I try to install a clean electron app with node and print keyup event in console using iohook.
Expected Behavior
npm start works fine and every keyup prints event in console.
Current Behavior
Cannot find module 'C:\Users\Matheus Prado\projects\personal\electron-quick-start\node_modules\iohook\builds\electron-v89-win32-x64\build\Release\iohook.node' Require stack:
at Module._resolveFilename (internal/modules/cjs/loader.js:887:15) at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128) at Module._load (internal/modules/cjs/loader.js:732:27) at Function.f._load (electron/js2c/asar_bundle.js:5:12913) at Module.require (internal/modules/cjs/loader.js:959:19) at require (internal/modules/cjs/helpers.js:88:18) at Object. (C:\Users\Matheus Prado\projects\personal\electron-quick-start\node_modules\iohook\index.js:24:21)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
Possible Solution
Improve the way the path is formed, or explain some things better. I tried changing the folder name and then the error changed, saying you had node_module V 89 and the plugin needed V 83 and I just didn't understand what that meant.
Steps to Reproduce (for bugs)
Install Node from: https://nodejs.org/download/release/v14.16.0/ Install electron with: npm i -D electron@latest Install iohook with: npm install iohook --save
And put this code in main.js of minimal project of electron:
Your Environment
Node.js 14.16.0 Electron: 13.2.2 SO: Windows Pro x64 ioHook: 0.9.3