microsoft / microsoft/monaco-editor

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

Open
#4,499 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the reproduction app from github.com/hardikmodi1/monaco-edrror and follow the reported sequence: load Groovy, switch to JSON or JavaScript, then switch back to Groovy. Start by tracing the language-switch and module-loading behavior in that app; done means switching languages no longer produces the loadForeignModule error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.