[Bug] 0.56.0 browser-esm-esbuild build error

Open
#5,405 4 comments 2 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@hediet is already working on this.

Since Jul 22, 2026.

Assessment

This issue has not been assessed yet.

Description

bug
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

0.56.0 fails to build.
It works fine with 0.55.1

$ npm run build
npm notice run build
npm notice run node ./build.js
Deleted dist
✘ [ERROR] Could not resolve "monaco-editor/esm/vs/editor/editor.main.js"

    index.js:1:24:
      1 │ import * as monaco from 'monaco-editor/esm/vs/editor/editor.main.js';
        ╵                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The module "./esm/vs/esm/vs/editor/editor.main.js" was not found on the file
  system:

    ../node_modules/monaco-editor/package.json:45:14:
      45 │     "./*.js": "./esm/vs/*.js",
         ╵               ~~~~~~~~~~~~~~~

Changes to package.json

v0.55.1

	"exports": {
		".": {
			"types": "./esm/vs/editor/editor.main.d.ts",
			"import": "./esm/vs/editor/editor.main.js",
			"require": "./min/vs/editor/editor.main.js"
		},
		"./*": "./*"
	},

v0.56.0

  "exports": {
    ".": {
      "types": "./esm/vs/index.d.ts",
      "import": "./esm/vs/index.js",
      "require": "./min/vs/index.js"
    },
    "./*.js": "./esm/vs/*.js",
    "./*": "./esm/vs/*.js"
  },
Monaco Editor Playground Code

Reproduction Steps
  • Install monaco-editor 0.56.0
  • Copy browser-esm-esbuild to /home
  • Open Terminal
  • npm run build
Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

No response

Dominant language
JavaScript
Stars
47k
Forks
4.2k
Avg merge
3d 13h
Merged PRs (30d)
13

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from microsoft/monaco-editor

All issues in microsoft/monaco-editor

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.