microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
40.49k stars 3.6k forks source link

[Bug] loadForeignModule error after I use editor with language json #4499

Open hardikmodi1 opened 6 months ago

hardikmodi1 commented 6 months ago

Reproducible in vscode.dev or in VS Code Desktop?

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Reproduction Steps

I have tried to reproduce the error here https://github.com/hardikmodi1/monaco-edrror Run the nextjs app and initially editor will render with groovy language at that time it is not giving any error on console, but if I switch the language to json then it gives the error and then if I switch to groovy then also it is continue giving the same error.

Actual (Problematic) Behavior

Gives loadForeignModule error when once the editor with json/javascript is loaded on screen and then editor with any other language like groovy is used.

Expected Behavior

Should not give the error with groovy and how to fix this error for all the languages in nextjs app?

Additional Context

No response

1340691923 commented 2 months ago

请问已经解决了吗