Skip to content

Conversation

@tbo47
Copy link

@tbo47 tbo47 commented Dec 9, 2025

I tested this update with my angular 20 project. Everything works fine.

I updated angular 20 to 21 following this guide: https://angular.dev/update-guide?v=20.0-21.0&l=1

Update monaco lib to the latest 0.55.1

It fixes the error:

Error: Failed to execute 'fetch' on 'WorkerGlobalScope': Failed to parse URL from /assets/monaco/vs/language/typescript/tsWorker.js

"monaco-editor": "^0.52.2"
"@angular/common": "^21.0.0",
"@angular/core": "^21.0.0",
"monaco-editor": "^0.55.1"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
I was wondering if it wouldn't be better to put a more permissive range here
^0.55.1 is equivalent to >=0.55.1 <0.56.0-0
isn't the intended range more like >=0.55.1 <1.0.0-0 ? or is it intentional to force the exact minor version ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about:

  "peerDependencies": {
    "@angular/common": ">=20",
    "@angular/core": ">=20",
    "monaco-editor": ">=0.51"
  },

Because it works with angular 20 and 21 so far.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@tbo47
Copy link
Author

tbo47 commented Dec 15, 2025

@miki995 thoughts?

@Verten
Copy link

Verten commented Dec 19, 2025

Thanks god, i also found the console error in my browser.

TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': Failed to parse URL from ./assets/monaco-editor/min/vs/language/json/jsonWorker.js

So, is it means when we upgrading to latest monaco editor version can be fixed it? thanks again

@tbo47
Copy link
Author

tbo47 commented Dec 19, 2025

Thanks god, i also found the console error in my browser.

TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': Failed to parse URL from ./assets/monaco-editor/min/vs/language/json/jsonWorker.js

So, is it means when we upgrading to latest monaco editor version can be fixed it? thanks again

Are you using the latest monaco-editor 0.55.1?
I don't see this error. I tested on a angular 20 and angular 21 project.

@jelledijkstra97
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants