App threw an error during load
Error: The module '\\?\C:\Users\talon\OneDrive\Desktop\focus\node_modules\cap\build\Release\cap.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func (electron/js2c/asar.js:155:31)
    at process.func [as dlopen] (electron/js2c/asar.js:155:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18)
    at Object.func (electron/js2c/asar.js:155:31)
    at Object.func [as .node] (electron/js2c/asar.js:155:31)
    at Module.load (internal/modules/cjs/loader.js:645:32)
    at Function.Module._load (internal/modules/cjs/loader.js:560:12)
    at Module.require (internal/modules/cjs/loader.js:685:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (C:\Users\talon\OneDrive\Desktop\focus\node_modules\cap\lib\Cap.js:3:13)

 

 

 

Thank you this helped! Just for reference if anyone is having the same issues, here are the commands you need to run that come from the link provided by @mscdex:

npm install --save-dev electron-rebuild

 

 

 

was compiled against a different Node.js version using
NODE_MODULE_VERSION 48. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module

I see, thanks for pointing that out!

I get it now: npm rebuild uses my local node (ABI 72), which isn't what electron has.

The question is, how can I get electron rebuild to work? I have the latest electron-rebuild, v 1.8.6.

This is what I've tried so far:

  • If I run npx electron-rebuild right now, then run Electron, I get the same 72 vs 73 error.
  • If I then remove node_modules and npm install, then the error becomes 48 vs 73.
  • If I then downgrade electron to ^5, re-install node_modules, error goes to 47 vs 70.
  • If I then run electron-rebuild, no change. 47 vs 70
  • If I then run npm rebuild, it goes to 72 vs 70 (seems to make sense, my node is v12, Electron v5 expects a lower ABI version).

Thanks for the help!

+ Recent posts