IDE error in ASAR build

If I create an asar build then IDE gives ‘Error: Cannot find module ‘…/src-gen/frontend/electron-main.js’’. when it opens. Is there any idea?

To use the asar build I’ve configured my electron-build.yml file like this:

files:
  - src-gen
  - lib
  - scripts
  - "!**node_modules/electron/**"

It works fine for my use case but according to this comment on the Theia Blueprint repository it’s not advised to use asar with Theia https://github.com/eclipse-theia/theia-blueprint/blob/master/applications/electron/electron-builder.yml#L10

See if it works for you.

Yes It worked thanks.

1 Like

@Hanksha ide is opening but plugins don’t work for example language servers, git etc.

Yes that’s why it’s not advised to use asar build with Theia. You can’t execute the binaries from asar archive. In your build, do you see your plugins folder outsite of app.asar?

Yes I see but I think cannot reach out of the asar package. But plugins that are installed from an IDE can run. @Hanksha

Is there any way to run with plugins using asar?

Hi devs,

maybe a stupid question, but …is there any news regarding the asar and running the plugins? From what I tried it seems still doesn’t works … is there plan to make it working?

@Nowass Due to Theia’s architecture (a separated backend-server + electron-main process), it’s not possible to completely package Theia as an ASAR package, as that would make it impossible to start the backend server. There are no plans to change this behavior as of now.

Ok, I’ve got it… Thanks for explanation…