I’ve been successfully building a modified version of the theia-full docker image. However, I need to make a modification to the @theia/code, and while this works when developing locally, as soon as I try to use the updated package from within the docker container I get errors.
How to replicate
Steps
-
Build
@theia/core
, and then runyarn pack
to generate atheia-core-v1.0.0.tgz
-
Update
Dockerfile
to addtheia-core-v1.0.0.tgz
to/home/theia
folder -
Update
@theia/core
dependency innext.package.json
[here[(https://github.com/theia-ide/theia-apps/blob/master/theia-full-docker/next.package.json#L15) to point to:file:///home/theia/theia-core-v1.0.0.tgz
-
Build docker image (this will build my updated version of
@theia/core
) -
Boot docker container and connect
-
Access theia via browser http://localhost:3000
The error I get
From here you will see theia’s spinner but will fail to load and give the following error in the browsers dev console (see screenshot at end):
Failed to start the frontend application. index.js:80:16
exports index.js:80
Error: "Cannot apply @injectable decorator multiple times."
injectable injectable.js:8
<anonymous> Reflect.js:541
<anonymous> Reflect.js:130
a decorator_utils.js:42
decorate decorator_utils.js:55
<anonymous> widget.ts:27
exports index.js:82
My understanding is that this issue is happening because each individual package is using a different core version (than the one I manually built).
How do I get past issue?
Screenshot of issue:
[original thread by Bradley Steinfeld]