Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Failed to parse URL from ./assets/monaco/min/vs/language/typescript/tsWorker.js #27

Open
sysmat opened this issue Dec 22, 2024 · 4 comments

Comments

@sysmat
Copy link

sysmat commented Dec 22, 2024

  • using ng 19
  • "ngx-monaco-editor-v2": "^19.0.2",
  • adding angular.json
{"assets": [
          { "glob": "**/*", "input": "node_modules/ngx-monaco-editor-v2/assets/monaco", "output": "./assets/monaco/" }

        ],
  • provider in config
provideMonacoEditor(),
  • error in runtime
Uncaught Error: Failed to execute 'fetch' on 'WorkerGlobalScope': Failed to parse URL from ./assets/monaco/min/vs/language/typescript/tsWorker.js

TypeError: Failed to parse URL from ./assets/monaco/min/vs/language/typescript/tsWorker.js
@sysmat
Copy link
Author

sysmat commented Dec 22, 2024

@DaniilStep
Copy link

Found a solution. You need to use monaco-editor version 0.50.0.
Works fine with Angular v19
image

@sysmat
Copy link
Author

sysmat commented Dec 26, 2024

@DaniilStep thx for info, ok no errors for fetch, but there is no code completions for SQL

readonly editorSqlOptions = { theme: 'vs-dark', language: 'sql' };
  • monaco dosen't have sql support

@ratatoeskr666
Copy link

Same for JSON. But @DaniilStep workaround works!
Unfortunately you have to npm install --force or you'll receive a peer dependency error

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

No branches or pull requests

3 participants