Skip to content

bug: Monaco Editor logs worker errors in Web Component integrations #493

Description

@fantonangeli

Describe the Bug

The OWS Text Editor works correctly in Web Component integrations, but the browser console reports errors related to Monaco's editorWorkerService:

Failed to load worker script for label: editorWorkerService.
Ensure your bundler properly bundles modules referenced by "new URL('...?esm', import.meta.url)".

TypeError: Failed to resolve module specifier
"../../../base/common/worker/webWorkerBootstrap.js".
Invalid relative url or base scheme isn't hierarchical.

The issue is non-blocking. The editor loads and works as expected, including Language Service features such as completions and JSON Schema diagnostics.

This issue was identified during the Text Editor PoC #488. The fix should be addressed as part of the final Dual Editor integration tracked in #369.

Steps to reproduce

  1. Build and run the Text Editor Vanilla Web Component PoC from PR DO NOT MERGE - fix #380 - poc: Validate Text Editor and Language Service in vanilla Web Component #488.
  2. Open the example in a browser.
  3. Open the browser developer console.
  4. Observe the editorWorkerService errors.

The errors are reproducible in both development and production builds.

Expected Behavior

The Text Editor initializes and operates without errors in the browser console.

Editor Version

Local Text Editor PoC build from #488 (Monaco Editor 0.57.0).

Platform

Web / Browser

Additional Context

Discovered while validating the Text Editor and Language Service integration through a Web Component (#380, PR #488).

The same errors were also observed in the Quarkus Flow Dev UI integration.

No visible functional regressions have been identified.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions