Skip to content

[Bug] 0.56.0 browser-esm-esbuild build error #5405

Description

@erosman

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

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions