Vite reports errors since 24.2.1

Today i updated from Vaadin 24.1.4 to 24.2.1.
Since my update, vite logs the following errors to the console:

ERROR(TypeScript) Interface ‘Document’ incorrectly extends interface ‘DocumentOrShadowRoot’.
Types of property ‘adoptedStyleSheets’ are incompatible.
The type ‘readonly CSSStyleSheet’ is ‘readonly’ and cannot be assigned to the mutable type ‘CSSStyleSheet’.
FILE C:/intellij_workspace/XXX/Application/gui/main/node_modules/typescript/lib/lib.dom.d.ts:6689:11

6687 |  * [MDN Reference])
6688 |  */

6689 | interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEventHandlers, NonElementParentNode, ParentNode, XPathEvaluatorBase {
| ^^^^^^^^
6690 | /**
6691 | * Sets or gets the URL for the current document.
6692 | *

ERROR(TypeScript) Interface ‘ShadowRoot’ incorrectly extends interface ‘DocumentOrShadowRoot’.
Types of property ‘adoptedStyleSheets’ are incompatible.
The type ‘readonly CSSStyleSheet’ is ‘readonly’ and cannot be assigned to the mutable type ‘CSSStyleSheet’.
FILE C:/intellij_workspace/XXX/Application/gui/main/node_modules/typescript/lib/lib.dom.d.ts:21187:11

21185 |
21186 | /** [MDN Reference]*/

21187 | interface ShadowRoot extends DocumentFragment, DocumentOrShadowRoot, InnerHTML {
| ^^^^^^^^^^
21188 | /** [MDN Reference]*/
21189 | readonly delegatesFocus: boolean;
21190 | /** [MDN Reference] */

[TypeScript] Found 2 errors. Watching for file changes.

vaadin:dance or deletion of node_modules did not help. The application can run despite the error, but its annoying. Any ideas how to get rid of the error?

Is the project configured to use pnpm instead of npm?

I did not change any vaadin defaults regarding this
Maybe the file in the snapshotted directory indicate this? Or how can i configure this?

Edit: should be npm as this is the default according to vaadin docs
grafik.png

Try to rename or delete the pnpmfile.js and see if it works

To see if pnpm is enabled check the configuration of the Vaadin maven plugin in pom file

deleted that file and updated the in fact existing pnpmEnable property to false in my pom.xml, but the error still remains

You can try deleting also the pnpm cache. I don’t rememeber the location right now, maybe something like $HOME/.pnpm-store or similar

An, but you switched to npm, so it may not be helpful

Try also to check if there’s a hidden file .pnpmfile.cjs in the project folder and delete it if present

i tried all the above, the error complaining about the incorrect interface extension still remains. Might that have somthing to do with the selection-grid dependency (3.0.1)? This is the only vaadin/frontend related dependency that i have in my pom files that is not standard vaadin. As said, this error was not present in 24.1.5 or before.

Try getting rid of that selection-grid temporarily and see what happens.

removed the dependency, cleared the node_modules folder, deleted package.json and package-lock.json, the error still remains.

Might be worth trying with different node / npm versions? Personally, I’m using Node 18.6.1 / npm 9.51

i will give it a try