Electron app fails to launch

When I try to launch the electron app from the cmdline yarn --cwd packages/electron-app start it fails with the drivelist.node did not self register

Failed to start the electron application.
Error: Module did not self-register: '/home/a/workspace/ui/node_modules/drivelist/build/Release/drivelist.node'.
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1034:18)
    at Object.func [as .node] (electron/js2c/asar.js:140:31)
    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 bindings (/home/a/workspace/ui/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/home/a/workspace/ui/node_modules/drivelist/js/index.js:25:27)

I have seen this before and the solution suggested in link), helped me move on in the past.

However, now after moving to latest Theia 1.19.0, the above solution no longer works. Can someone please help shed some light?

PS - I also see a module not found message when I do yarn rebuild:electron, which I don’t recall seeing earlier.

$ theia rebuild:electron
Module not found: find-git-repositories
Processed "@theia/node-pty"
Processed "nsfw"
Processed "drivelist"
Processed "native-keymap"
✔ Rebuild Complete
Done in 4.85s.

@akhileshraju thank you for the discussion, I believe you’ve encountered the following problem which is a bug from electron-rebuild:

Thanks for the quick response @vince-fugnitto!

1 Like