Electron-builder and theia

Hi all,

I’m trying to create mac/win/linux installer for theia electron app starting from theia repository using electron-builder tool.
Just to start from easiest scenario, I decided to create an unpackaged app.

Since theia seems to be a two package.json structured project, I follow these steps:

  • git clone https://github.com/eclipse-theia/theia & cd theia-master

  • yarn install

  • yarn add -W --dev eclipse-builder

  • yarn rebuild:electron

  • created electron-builder.yaml in repo root folder

  • added script line “dist”: “electron-builder” to package.json in repo root folder

  • finally, yarn run dist

After last step, successfully mac app is generated under root dist folder.
The problem is that when I try to start the generated app I got a dependency error: not found fix-path at src-gen/font-end/electron-main.js line 7.
Digging a bit, fix-path is in the dependencies of yarn.lock file and I found fix-path module correctly installed in node_modules of repo root folder (dev context of a two package.json project), but not in the node_modules of /examples/electron app folder (app context of a two package.json project)

My electron-builder.yml file has these main lines:
asar: false
buildResources: buildResources
app: examples/electron/lib
- from: plugins
to: app/plugins

Am I missing something?

Thank you in advance,

[original thread by davide-sergi]

It is not possible to build from the mono repo. Please see https://github.com/theia-ide/theia-apps/tree/master/theia-electron instead


Sorry for the late. I tried theia-electron and it works.
I was able to create .dmg and .exe. Thank you very much.
I will try to change git repository url - in electron-builder.yml - with a my custom version version of theia. I think that it should work fine also.