microsoft / microsoft/monaco-editor

[Bug] Imported `editor.api.js` doesn't expose the language namespaces anymore (moved in 0.55.0)

Open
#5,346 7 comments 3 reactions 1 assignee View on GitHub

@hediet is already working on this.

Since Jun 1, 2026.

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

Reproduction Steps
  • Set up a project with a sample like this one: browser-esm-vite-react
  • Get latest version npm i monaco-editor@0.55.1
import * as monaco from "monaco-editor/esm/vs/editor/editor.api";
monaco.languages.typescript; // marked as deprecated
monaco.typescript; // error, Property doesn't exist
Actual (Problematic) Behavior

The moved namespaces as mentioned in the Changelog 0.55.0 aren't available anymore when using .../editor.api.

Workarounds
  • Importing .../editor.main instead
    • Imports all languages, which isn't the desired behavior
  • Additional import: import * as typescript from "monaco-editor/esm/vs/language/typescript/monaco.contribution";
    • Would work, but no typing at all
Expected Behavior

Correctly exposed language namespaces when working with editor.api.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.