Frontend build not possible with Vaadin 23.4.0, Java 11

I got the following error when building the frontend:

[ERROR] node_modules/@types/node/ffi.d.ts(94,21): error TS1139: Type parameter declaration expected.
[ERROR] node_modules/@types/node/ffi.d.ts(94,29): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(95,13): error TS1005: ')' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(95,22): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(96,21): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(97,5): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(97,6): error TS1128: Declaration or statement expected.
[ERROR] node_modules/@types/node/ffi.d.ts(206,21): error TS1139: Type parameter declaration expected.
[ERROR] node_modules/@types/node/ffi.d.ts(206,27): error TS1434: Unexpected keyword or identifier.
[ERROR] node_modules/@types/node/ffi.d.ts(206,29): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
[ERROR] node_modules/@types/node/ffi.d.ts(206,37): error TS1434: Unexpected keyword or identifier.
[ERROR] node_modules/@types/node/ffi.d.ts(206,54): error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
[ERROR] node_modules/@types/node/ffi.d.ts(206,60): error TS1005: ')' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(206,79): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(206,81): error TS1434: Unexpected keyword or identifier.
[ERROR] node_modules/@types/node/ffi.d.ts(206,82): error TS1128: Declaration or statement expected.
[ERROR] node_modules/@types/node/ffi.d.ts(206,83): error TS1128: Declaration or statement expected.
[ERROR] node_modules/@types/node/ffi.d.ts(214,23): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(214,34): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(214,43): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(215,22): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(215,30): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(215,57): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(215,70): error TS1005: ')' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(215,72): error TS1434: Unexpected keyword or identifier.
[ERROR] node_modules/@types/node/ffi.d.ts(215,73): error TS1128: Declaration or statement expected.
[ERROR] node_modules/@types/node/ffi.d.ts(215,74): error TS1128: Declaration or statement expected.
[ERROR] node_modules/@types/node/ffi.d.ts(219,23): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(219,32): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(223,21): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(256,34): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(256,46): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(256,47): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(257,26): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(257,34): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(257,59): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(258,22): error TS1005: ')' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(259,21): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(260,9): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(260,10): error TS1128: Declaration or statement expected.
[ERROR] node_modules/@types/node/ffi.d.ts(273,35): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(273,44): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(273,50): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(277,28): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(277,37): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(277,43): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(285,30): error TS1005: ',' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(285,39): error TS1005: ';' expected.
[ERROR] node_modules/@types/node/ffi.d.ts(285,45): error TS1109: Expression expected.
[ERROR] node_modules/@types/node/ffi.d.ts(486,1): error TS1128: Declaration or statement expected.

Thanks for reporting. This is a known issue that will be resolved in the next Vaadin 23.6 version.
The current workaround should be adding the following overrides in package.json

"typescript": "6.0.3",
"@types/node": "26.0.1"
1 Like

How is it possible to suddenly start failing? I guess it was not failing when the version was released …

Actually, the correct fix seems to be pinning β€œ@types/node”: β€œ18.19.115.” Sorry for the confusion.

This is the fix applied to the next 23.6 release

I guess some transitive dependency caused a newer @types/node package to be used

Do you have an overview of the Vaadin versions that are affected?

Do you have the corresponding Vaadin ticket for me?

We spot the issue only on 23.6 (EOL, requires a commercial license); older 23 minors are not supported anymore.
No ticket, unfortunately. The PR was created based on an internal discussion.