serdarciplak / BlazorMonaco

Blazor component for Microsoft's Monaco Editor which powers Visual Studio Code.
https://serdarciplak.github.io/BlazorMonaco/
MIT License
441 stars 99 forks source link

Uncaught Error: Can only have one anonymous define call per script file with Blazor Server #52

Closed OrionRiftStudios closed 1 year ago

OrionRiftStudios commented 2 years ago

Finally I can use Monaco Editor using your library in my project. but I am having this issue .

I would like to know how to solve this issue.

Uncaught Error: Can only have one anonymous define call per script file at r.enqueueDefineAnonymousModule (loader.js:7:5413) at _ (loader.js:8:1734) at Chart.min.js:7:179 at Chart.min.js:7:302 blazor.server.js:1 [2022-02-18T13:50:56.874Z] Information: Normalizing '_blazor' to 'https://localhost:5001/_blazor'. loader.js:1344 Duplicate definition of module 'vs/editor/editor.main.nls'

I found this link but honestly I don't know how to fix it with Blazor Server https://github.com/microsoft/monaco-editor/issues/2283

thank you

leigh-pointer commented 2 years ago

You need to load all your java script before you load lib/monaco-editor/min/vs/loader.js