Skip to content

[Bug] Issue with JSON validation with Rolldown-Vite (Vite 8) #5265

@amcsi

Description

@amcsi

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

Sorry if this is not an issue with monaco-editor, but I did want to make sure there's a ticket here in case anyone else is experiencing this.

After upgrading from Vite 7 to Vite 8, suddenly JSON validation doesn't work. I get an error (shown lower down), and JSON validation does not happen (no squiggly lines if something is wrong). Weirdly I only get the error when doing vite build, but not with vite dev.

I seem to be getting this issue when there's a part of the schema that validates arrays of objects.

I'll try to provide a minimal reproduce-able repo tomorrow.

TypeError: Cannot read properties of undefined (reading 'include')
    at Z (json.worker-DqU5Wxnl.js:42:13188)
    at l (json.worker-DqU5Wxnl.js:42:19511)
    at Z (json.worker-DqU5Wxnl.js:42:13322)
    at u (json.worker-DqU5Wxnl.js:42:22175)
    at Z (json.worker-DqU5Wxnl.js:42:13299)
    at Qc.getMatchingSchemas (json.worker-DqU5Wxnl.js:42:13045)
    at json.worker-DqU5Wxnl.js:57:6239
    at Z (json.worker-DqU5Wxnl.js:42:13188)
    at l (json.worker-DqU5Wxnl.js:42:19511)
    at Z (json.worker-DqU5Wxnl.js:42:13322)
    at u (json.worker-DqU5Wxnl.js:42:22175)
    at Z (json.worker-DqU5Wxnl.js:42:13299)
    at Qc.getMatchingSchemas (json.worker-DqU5Wxnl.js:42:13045)
    at json.worker-DqU5Wxnl.js:57:6239
    at errors.js:15:31
    at r (helpers.js:93:17)

TypeError: Cannot read properties of undefined (reading 'include')
    at Z (json.worker-DqU5Wxnl.js:42:13188)
    at l (json.worker-DqU5Wxnl.js:42:19511)
    at Z (json.worker-DqU5Wxnl.js:42:13322)
    at u (json.worker-DqU5Wxnl.js:42:22175)
    at Z (json.worker-DqU5Wxnl.js:42:13299)
    at Qc.validate (json.worker-DqU5Wxnl.js:42:12741)
    at s (json.worker-DqU5Wxnl.js:57:1176)
    at json.worker-DqU5Wxnl.js:57:1759
overrideMethod @ installHook.js:1
(anonymous) @ console.js:36
(anonymous) @ lspLanguageFeatures.js:145
Promise.then
_doValidate @ lspLanguageFeatures.js:144
r @ lspLanguageFeatures.js:92
He @ lspLanguageFeatures.js:129
X @ jsonMode.js:90
c @ jsonMode.js:176
Z @ jsonMode.js:187
(anonymous) @ monaco.contribution.js:141
Promise.then
(anonymous) @ monaco.contribution.js:141
(anonymous) @ standaloneLanguages.js:53
_deliver @ event.js:866
_deliverQueue @ event.js:877
fire @ event.js:898
requestRichLanguageFeatures @ languageService.js:78
sT @ textModel.js:238
_createInstance @ instantiationService.js:138
createInstance @ instantiationService.js:109
_createModelData @ modelService.js:246
createModel @ modelService.js:290
x9 @ standaloneCodeEditor.js:332
b9 @ standaloneCodeEditor.js:326
TMe @ standaloneEditor.js:180
we @ index.mjs:1
Q @ index.mjs:1
(anonymous) @ index.mjs:1
(anonymous) @ index.mjs:1
jc @ react-dom.production.min.js:243
Zl @ react-dom.production.min.js:285
(anonymous) @ react-dom.production.min.js:281
x @ scheduler.production.min.js:13
O @ scheduler.production.min.js:14Understand this error

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions