monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

[Bug] Missing type declarations for basic-languages/typescript/typescript

Open paustint opened this issue 1 month ago • 1 comments

Reproducible in vscode.dev or in VS Code Desktop?

  • [x] Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

I just upgraded from version 52 to version 55.1 and everything appeared to be working, but when I tried to build the application I got the following error.

I am using a pretty normal vite setup

I have a custom language and am using typescript as the foundation for symbols/escapes/etc..

Am I doing something wrong, or is this a bug?

libs/monaco-configuration/src/lib/language-sfdc-formula.ts:2:58 - error TS2307: Cannot find module 'monaco-editor/esm/vs/basic-languages/typescript/typescript' or its corresponding type declarations.

  1 | import type * as monaco from 'monaco-editor';
> 2 | import { conf as tsConfig, language as tsLanguage } from 'monaco-editor/esm/vs/basic-languages/typescript/typescript';
    |                                                          ^
  3 | type Monaco = typeof monaco;
  4 | 

I am importing this - which VSCode can resolve and it runs fine in dev mode with vite, but upon build it no longer works.

import { conf as tsConfig, language as tsLanguage } from 'monaco-editor/esm/vs/basic-languages/typescript/typescript';

Monaco Editor Playground Code


Reproduction Steps

No response

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

No response

paustint avatar Nov 22 '25 03:11 paustint

I'm sorry that you are running into this problem. I'd be very happy if you could investigate why this happens! It sounds like this is caused by this fix for https://github.com/microsoft/monaco-editor/issues/5010.

hediet avatar Nov 24 '25 16:11 hediet