Packages with version mismatches

Hi All

I am busy trying to move project from vaadin 21 to a newer (supported ) version. (Yes I know vaadin 21 is not supported but I am trying to move away to something that is.)

A straight update of the pom from 21 to vaadin 24 results in about 800 or so errors and a build that will not run.

Sooo… a step by step increment in Vaadin versions with fixes was working until going from version 23.2.0 to 23.2.17 I do get a build but with errors and the build will not run.

I have tried deleting all node_modules .m2 folders and rebuilding the entire project from scratch.

However in the fresh project I am still getting the same error.

Running Vite to compile frontend resources. This may take a moment, please stand by…
@vaadin/bundles has version mismatches with installed packages, Vaadin component dependency bundles are disabled.
Packages with version mismatches: [
{
“name”: “@vaadin/vaadin-development-mode-detector”,
“bundledVersion”: “2.0.5”,
“installedVersion”: “2.0.6”
}
]

Started Vite. Time: 11607ms
➜ Local: http://127.0.0.1:62392/exceedweb/VAADIN/

ERROR(TypeScript) ‘ReadableByteStreamController’ is referenced directly or indirectly in its own type annotation.
FILE C:/work/projects/exceed/exceed_vaadin2n/exceed/ExceedWeb/node_modules/@types/node/stream/web.d.ts:487:13

485 |          * @since v18.0.0
486 |          */

487 | var ReadableByteStreamController: typeof globalThis extends
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
488 | { onmessage: any; ReadableByteStreamController: infer T } ? T
489 | : typeof import(“stream/web”).ReadableByteStreamController;
490 |

ERROR(TypeScript) ‘ReadableStreamBYOBReader’ is referenced directly or indirectly in its own type annotation.
FILE C:/work/projects/exceed/exceed_vaadin2n/exceed/ExceedWeb/node_modules/@types/node/stream/web.d.ts:506:13

504 |          * @since v18.0.0
505 |          */

506 | var ReadableStreamBYOBReader: typeof globalThis extends { onmessage: any; ReadableStreamBYOBReader: infer T }
| ^^^^^^^^^^^^^^^^^^^^^^^^
507 | ? T
508 | : typeof import(“stream/web”).ReadableStreamBYOBReader;
509 |

ERROR(TypeScript) ‘ReadableStreamBYOBRequest’ is referenced directly or indirectly in its own type annotation.
FILE C:/work/projects/exceed/exceed_vaadin2n/exceed/ExceedWeb/node_modules/@types/node/stream/web.d.ts:516:13

514 |          * @since v18.0.0
515 |          */

516 | var ReadableStreamBYOBRequest: typeof globalThis extends { onmessage: any; ReadableStreamBYOBRequest: infer T }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
517 | ? T
518 | : typeof import(“stream/web”).ReadableStreamBYOBRequest;
519 |

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

Any advice on how to fix this would be greatly appreciated.

It might be possible that this exact version has such a bug…

What are the blockings for moving to 24.4 or 24.5? All those 800 errors might just be errors from the mandatory Java EE to Jakarta Switch that happened in the industry some years ago.

Thanks for the reply
The original development was on Java 1.8 Vaadin 20 and Spring 3.1.2 so yes lots of updating and yes not all the errors were to do with Vaadin.

The 23.2.0 to 23.2.17 where I am getting the errors above is against
Java 17
Springframework spring-boot-starter-web 2.7.18
any of the above combinations a big NO?

I am trying to move to Vaadin 23.5.8 ( a big jump) right now to see if I can bypass the Vite compile runtime errors. Would you recommend against this?
Right now I am getting an error to do with spring security VaadinWebSecurity VaadinDefaultRequestCache

I also had errors with the menubar but I have manged to get the menubar errors sorted (ie it compiles now but is not tested).
I keep clearing everything ie deleting all node_modules .m2 folders and rebuilding the entire project in different folders as I go.
That cleared up the issues with the vaadinbootstrap.

Still working on the VaadinDefaultRequestCache. ( Any hints? )

I would really like to just get my programme to build and run on Vaadin 23 before I move to different versions of Vaadin or Java or Spring or… :grinning:

I can’t really help you with 23.2 because that version might contain bugs that nobody knows anymore :D the latest free version of 23.x is Release Vaadin 23.4.1 · vaadin/platform · GitHub - I would suggest to try that version… that should rule out such nasty things hopefully.

What errors do you get with Spring Security? Runtime? Compile Time?

Just a hint for refactoring when changing to Spring Boot 3 and modern Java:

At https://docs.openrewrite.org/ are a lot of recipes which may help (at least they helped us). We used it when switching from Java 11 and Spring Boot 2.7 to Java 21 and Spring Boot 3.

It e.g. can exchange the “old” javax with the proper jakarta imports just with a CLI Maven command.

Within short time we were able to run our older Vaadin 23 app with Vaadin 24.5

Cheers
Mojo

Thank you for this. :+1: I will probably needs this sooner than I think :grinning: