generator-theia-extension icon indicating copy to clipboard operation
generator-theia-extension copied to clipboard

Error when starting Theia (hello world template)

Open JonasHelming opened this issue 2 years ago • 3 comments

I get the following error when starting Theia after generating a fresh template:

node:internal/modules/cjs/loader:1093 throw err; ^

Error: Cannot find module '/home/(...)/browser-app/src-gen/backend/main.js' at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15) at Module._load (node:internal/modules/cjs/loader:934:27) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12) at node:internal/main/run_main_module:23:47 { code: 'MODULE_NOT_FOUND', requireStack: [] }

Node.js v19.9.0 Done in 1.42s.

JonasHelming avatar Sep 18 '23 06:09 JonasHelming

With a recent commit the flow changed a bit.

The generated Browser and Electron applications are no longer build automatically but must be build manually. This change is reflected in the generated READMEs.

Therefore yarn build:browser must be executed before running yarn start:browser.

Do you think that's fine or should we rather build one of the example apps again by default, e.g. the browser application?

sdirix avatar Sep 18 '23 11:09 sdirix

I think, we should build both apps directly after the generator has generated, @vince-fugnitto WDYT?

JonasHelming avatar Sep 18 '23 14:09 JonasHelming

FWIW, we ran into this, too. Also thought it was a regression until I found this ticket.

jcortell68 avatar Oct 04 '23 20:10 jcortell68