microsoft / microsoft/monaco-editor

[Bug] `Error`: cpp: an 'include' attribute must be a string at: tokenizer.root

Open
#4,635 0 comments 0 reactions 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

No response

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

I’m working on a Vue 2 project with monaco-editor library and using webpack alongside monaco-editor-webpack-plugin. When initializing the editor with any language, I encounter the following error:

Error: "langauge": an 'include' attribute must be a string at: tokenizer.root.
Screenshot from 2024-08-08 20-41-50

There are no compilation errors with respect to webpack side of things. I’m using the following versions:

  • monaco-editor: 0.21
  • monaco-editor-webpack-plugin: 2.1

My issue is similar to #3712 but in this case I'm not defining any custom languages. I also tried using newer versions of monaco-editor and monaco-editor-webpack-plugin but still got the same error. I would appreciate any insights into solving this bug or what I could be doing wrong.

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

The report provides no reproduction steps, playground link, source files, or tests. Start by reproducing the tokenizer.root error with the stated monaco-editor and monaco-editor-webpack-plugin versions, then compare the behavior with issue #3712 and newer versions. Done means identifying a reliable cause and a confirmed fix or workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.