Initialization of this module fails with TypeError
Treverix opened this issue · 2 comments
Treverix commented
[10:25:14.756] [debug] [main] > TypeError: globalThis.FinalizationRegistry is not a constructor
at Object.<anonymous> (C:\dev\prj\xxx\node_modules\@electron\remote\dist\src\main\server.js:20:30)
at Module._compile (internal/modules/cjs/loader.js:967:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1004:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (C:\dev\prj\xxx\node_modules\@electron\remote\dist\src\main\index.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:967:30)
I've placed the require('@electron/remote/main').initialize()
statement at the the start of the application code (typescript file) and also tried inside the app.on('ready')
listener. The above exception is what I receive.
electron version: 9.1.1
node: 14.2.0
typescript: 3.9.7
Treverix commented
Upgraded to node 14.7.0, which as the FinalizationRegistry but still not working with electron 9.1.1. I found a hint in the internal package.json that it might require election 10.x. I recommend adding minimal versions of node/electron to the readme.