Closed bad-github closed 1 year ago
Could you check which Theia version are you building against? You see this for example in the /browser-app/package.json
@JonasHelming This is an issue I've encountered multiple times during my inversify update PR. We should change here:
- @postConstruct()
- protected async init(): Promise < void> {
- this.id = <%= params.extensionPrefix %>Widget.ID;
- this.title.label = <%= params.extensionPrefix %>Widget.LABEL;
- this.title.caption = <%= params.extensionPrefix %>Widget.LABEL;
- this.title.closable = true;
- this.title.iconClass = 'fa fa-window-maximize'; // example widget icon.
- this.update();
- }
+ @postConstruct()
+ protected init(): void {
+ this.doInit();
+ }
+
+ protected async doInit(): Promise <void> {
+ this.id = <%= params.extensionPrefix %>Widget.ID;
+ this.title.label = <%= params.extensionPrefix %>Widget.LABEL;
+ this.title.caption = <%= params.extensionPrefix %>Widget.LABEL;
+ this.title.closable = true;
+ this.title.iconClass = 'fa fa-window-maximize'; // example widget icon.
+ this.update();
+ }
The version is: "@theia/core": "latest", others are the latest. msujew's answer successfully solved my problem. thank you all
I created a base project with scaffolding using the widget option, and this was created successfully. But when I click the registered menu under view, it always prompts an error: "You are attempting to construct 'class MyWidget' in a synchronous way but it has asynchronous dependencies.