BlazorMonaco icon indicating copy to clipboard operation
BlazorMonaco copied to clipboard

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

Open OrionRiftStudios opened this issue 3 years ago • 1 comments

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

OrionRiftStudios avatar Feb 18 '22 13:02 OrionRiftStudios

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

leigh-pointer avatar Mar 08 '22 15:03 leigh-pointer