Migrating to 25.2 - build frontend errors with vaadin-themable-mixin

Hi,

I am migrating an app from v 24.8.8 to 25.2.6.
So far I have done the pre-requisites (java version (25), lib upgrades, etc.) and switched the vaadin version.

I haven’t really done anything else yet.
When I try to build I get the following error.
I know it is a little vague without the code but maybe someone has already met this error before and can point me in the right direction. It happens in the build-frontend phase.

Thanks a lot!

[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] — clean:3.5.0:clean (default-clean) @ voyager-ui —
[INFO] Deleting D:\Prg\work\IdeaJavaProjects\Voyager\Voyager-UI\target
[INFO]
[INFO] — buildnumber:3.3.0:create (default) @ voyager-ui —
[INFO] ShortRevision tag detected. The value is ‘8’.
[INFO] Storing buildNumber: 7b3f610e at timestamp: 1786892605747
[INFO] Storing scmBranch: main
[INFO]
[INFO] — resources:3.5.0:resources (default-resources) @ voyager-ui —
[INFO] skip non existing resourceDirectory D:\Prg\work\IdeaJavaProjects\Voyager\Voyager-UI\src\main\resources
[INFO]
[INFO] — compiler:3.15.0:compile (default-compile) @ voyager-ui —
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 1 source file with javac [debug release 25] to target\classes
[INFO]
[INFO] — vaadin:25.2.6:prepare-frontend (default) @ voyager-ui —
[INFO] ClassFinder initialized: 122 urls, 10340 classes scanned, 45 annotation types cached, 2862 subtype relationships cached, took 414ms
[WARNING] This project has a legacy frontend directory (./frontend/) present and it will be used as a fallback. Support for the legacy directory will be removed in a future release. Please move its contents to the default frontend directory (./src/main/frontend/), or delete it if its contents are not needed in the project. Also remove ‘frontendDirectory’ parameter that points to the legacy directory, if present.
[WARNING] Multiple npm versions for @vaadin/number-field found: [25.2.7, 24.0.8]. First version found ‘25.2.7’ will be considered.
[WARNING] Multiple npm versions for @vaadin/number-field found: [25.2.7, 24.0.8]. First version found ‘25.2.7’ will be considered.
[WARNING] Multiple npm versions for @vaadin/number-field found: [25.2.7, 24.0.8]. First version found ‘25.2.7’ will be considered.
[INFO] Visited 176 classes. Took 105 ms.
[INFO] Copying frontend resources from jar files …
[WARNING] Addon ‘so-charts-6.0.1.jar’ contains frontend sources under META-INF/resources/frontend/. This location is deprecated; migrate them to META-INF/frontend/ (bundle sources for @JsModule/@CssImport) or to META-INF/resources/ (runtime resources for @StyleSheet/@JavaScript).
[WARNING] Addon ‘font-awesome-iron-iconset-6.0.1.jar’ contains frontend sources under META-INF/resources/frontend/. This location is deprecated; migrate them to META-INF/frontend/ (bundle sources for @JsModule/@CssImport) or to META-INF/resources/ (runtime resources for @StyleSheet/@JavaScript).
[INFO] Visited 125 resources. Took 41 ms.
[INFO]
[INFO] — vaadin:25.2.6:build-frontend (default) @ voyager-ui —
[WARNING] Multiple npm versions for @vaadin/number-field found: [25.2.7, 24.0.8]. First version found ‘25.2.7’ will be considered.
[WARNING] Multiple npm versions for @vaadin/number-field found: [25.2.7, 24.0.8]. First version found ‘25.2.7’ will be considered.
[WARNING] Multiple npm versions for @vaadin/number-field found: [25.2.7, 24.0.8]. First version found ‘25.2.7’ will be considered.
[INFO] Visited 176 classes. Took 7 ms.
[INFO] Checking if a production mode bundle build is needed
[INFO] Dependency @vaadin/aura is missing from the bundle
[INFO] A production mode bundle build is needed
[INFO] Skipping npm install because the frontend packages are already installed in the folder ‘D:\Prg\work\IdeaJavaProjects\Voyager\Voyager-UI\node_modules’ and the hash in the file ‘D:\Prg\work\IdeaJavaProjects\Voyager\Voyager-UI\node_modules.vaadin\vaadin.json’ is the same as in ‘package.json’
[INFO] Copying frontend resources from jar files …
[WARNING] Addon ‘so-charts-6.0.1.jar’ contains frontend sources under META-INF/resources/frontend/. This location is deprecated; migrate them to META-INF/frontend/ (bundle sources for @JsModule/@CssImport) or to META-INF/resources/ (runtime resources for @StyleSheet/@JavaScript).
[WARNING] Addon ‘font-awesome-iron-iconset-6.0.1.jar’ contains frontend sources under META-INF/resources/frontend/. This location is deprecated; migrate them to META-INF/frontend/ (bundle sources for @JsModule/@CssImport) or to META-INF/resources/ (runtime resources for @StyleSheet/@JavaScript).
[INFO] Visited 125 resources. Took 34 ms.
[INFO] PWA icons generated
[INFO] Using globally installed Node.js version 24.19.0
[INFO] Running Vite …
[WARNING] Found dependencies defined with different versions in project and Vaadin maven plugin.
Project dependencies are used, but plugin execution could fail if the versions are incompatible.
In case of build failure please analyze the project dependencies and update versions or configure exclusions for potential offending transitive dependencies.
You can use ‘mvn dependency:tree -Dincludes=groupId:artifactId’ to detect where the dependency is defined in the project.

com.fasterxml.jackson.core:jackson-annotations:jar: project version [2.22], plugin version [2.21]
org.jsoup:jsoup:jar: project version [1.23.1], plugin version [1.22.2]
commons-io:commons-io:jar: project version [2.5], plugin version [2.22.0]
com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar: project version [2.22.1], plugin version [2.22.0]
[ERROR] The build process encountered an error: Vite process exited with non-zero exit code 1.
Output: '[36mvite v8.0.16 building client environment for production…

transforming…? 661 modules transformed.
rendering chunks…
? Build failed in 1.62s
vite v8.0.16 building client environment for production…

WARN inlineDynamicImports option is ignored because codeSplitting: false is set.

transforming…? 80 modules transformed.
rendering chunks…
computing gzip size…
target/classes/META-INF/VAADIN/webapp/sw.js 19.01 kB │ gzip: 6.35 kB

? built in 62ms
error during build:
Build failed with 1 error:

[MISSING_EXPORT] “__themeRegistry” is not exported by “node_modules/@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js”.
?─[ node_modules/@vaadin/polymer-legacy-adapter/src/style-modules.js:9:10 ]
│
9 │ import { __themeRegistry as themeRegistry } from ‘@vaadin/vaadin-themable-mixin’;
│ ───────┬───────
│ ?───────── Missing export
───?

at aggregateBindingErrorsIntoJsError (file:///D:/Prg/work/IdeaJavaProjects/Voyager/Voyager-UI/node_modules/vite/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:48:18)                                                     
at unwrapBindingResult (file:///D:/Prg/work/IdeaJavaProjects/Voyager/Voyager-UI/node_modules/vite/node_modules/rolldown/dist/shared/error-BuvQYXuZ.mjs:18:128)                                                                  
at #build (file:///D:/Prg/work/IdeaJavaProjects/Voyager/Voyager-UI/node_modules/vite/node_modules/rolldown/dist/shared/rolldown-build-CrPk_lZe.mjs:3246:34)                                                                     
at async buildEnvironment (file:///D:/Prg/work/IdeaJavaProjects/Voyager/Voyager-UI/node_modules/vite/dist/node/chunks/node.js:33253:64)                                                                                         
at async Object.build (file:///D:/Prg/work/IdeaJavaProjects/Voyager/Voyager-UI/node_modules/vite/dist/node/chunks/node.js:33675:19)                                                                                             
at async Object.buildApp (file:///D:/Prg/work/IdeaJavaProjects/Voyager/Voyager-UI/node_modules/vite/dist/node/chunks/node.js:33672:153)                                                                                         
at async CAC.<anonymous> (file:///D:/Prg/work/IdeaJavaProjects/Voyager/Voyager-UI/node_modules/vite/dist/node/cli.js:777:3) {                                                                                                   

errors: [Getter/Setter]
}’
[ERROR] To diagnose the issue, please re-run Maven with the -X option to enable detailed debug logging and identify the root cause.

You may want to read the upgrade guide

Could you tell us which addons you’re using?
I guess one add-on is not working with Vaadin 25. You might also have custom JavaScript in your application that is using old dependencies

Yes, I am following this upgrade guide.

Thanks for your response.

The addon check is good idea, I use only that two addons that show up in the error log as well

  1. FontAwesome Iron Iconset, v 6.0.1
  2. SO Charts v 6.0.1
    Both are latest versions claiming Vaadin 25 compatibility.

The custom javascript was the problem, I had a custom NumberField class with these annotations:
@NpmPackage(value = “@vaadin/polymer-legacy-adapter”, version = “24.0.8”)
@NpmPackage(value = “@vaadin/number-field”, version = “24.0.8”)

Fixing it solved the error.
Thanks for your help!

1 Like