I created a project using the " * Flow / Java, Maven, and Jetty" option, doing a GitHub clone from GitHub - vaadin/skeleton-starter-flow: Default project template for Vaadin
I slightly modified the POM as shown further down below. I updated version to 24.9.1, and the example app ran successfully.
I changed the package name within the src > main > java folder from org.vaadin to my own package. But otherwise I did not change the content of the app. The same AppShell, GreetService, and MainView classes live there.
So this error should be very easy to replicate.
Changing the POM from <vaadin.version>24.9.1</vaadin.version> to the current <vaadin.version>25.0.0-alpha12</vaadin.version> results in these errors on the console within IntelliJ. Here is an excerpt of the 44K of error messages.
[INFO] Started oejs.Server@565030b7{STARTING}[12.1.1,sto=0] @4938ms
[INFO] Scan interval sec = 2
[vaadin-dev-server-1] INFO com.vaadin.flow.server.frontend.TaskUpdatePackages - using '/Users/basil_dot_work/.vaadin/node/node /Users/basil_dot_work/.vaadin/node/lib/node_modules/npm/bin/npm-cli.js --no-update-notifier --no-audit --scripts-prepend-node-path=true --ignore-scripts install' for frontend package installation
[vaadin-dev-server-1] INFO com.vaadin.flow.server.frontend.TaskUpdatePackages - Frontend dependencies resolved successfully.
[vaadin-dev-server-1] INFO com.vaadin.flow.server.frontend.TaskCopyFrontendFiles - Copying frontend resources from jar files ...
[vaadin-dev-server-1] INFO com.vaadin.flow.server.frontend.TaskCopyFrontendFiles - Visited 21 resources. Took 36 ms.
[vaadin-dev-server-1] INFO com.vaadin.flow.server.frontend.TaskUpdateImports -
Failed to find the following imports in the `node_modules` tree:
- @vaadin/list-box/src/vaadin-list-box.js
- @vaadin/number-field/src/vaadin-number-field.js
- @vaadin/grid/src/vaadin-grid-sorter.js
- @vaadin/multi-select-combo-box/src/vaadin-multi-select-combo-box.js
…
- @vaadin/accordion/src/vaadin-accordion-panel.js
- @vaadin/date-time-picker/src/vaadin-date-time-picker.js
- @vaadin/upload/src/vaadin-upload.js
- @vaadin/menu-bar/src/vaadin-menu-bar.js
If the build fails, check that npm packages are installed.
To fix the build remove `package-lock.json` and `node_modules` directory to reset modules.
In addition you may run `npm install` to fix `node_modules` tree structure.
…
[vaadin-dev-server-1] ERROR com.vaadin.flow.server.frontend.TaskRunDevBundleBuild - Command `/Users/basil_dot_work/.vaadin/node/node /Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/vite/bin/vite.js build` failed:
vite v7.1.7 building for production...
transforming...
✓ 2 modules transformed.
vite v7.1.7 building for production...
transforming...
✓ 79 modules transformed.
rendering chunks...
computing gzip size...
../../../target/dev-bundle/webapp/sw.js 71.56 kB │ gzip: 17.60 kB
✓ built in 385ms
✗ Build failed in 1.16s
error during build:
[vite]: Rollup failed to resolve import "@vaadin/vertical-layout/vaadin-vertical-layout.js" from "/Users/basil_dot_work/IdeaProjects/VotersWA/src/main/frontend/generated/vaadin.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
at viteLog (file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:33954:57)
at file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:33990:73
at Object.onwarn (file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/.vite-temp/vite.config.ts.timestamp-1759461137444-b1689d40538028.mjs:1486:11)
at onwarn (file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/@vitejs/plugin-react/dist/index.js:54:78)
at file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:33990:28
at onRollupLog (file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:33985:63)
at onLog (file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/vite/dist/node/chunks/dep-Bm2ujbhY.js:33786:4)
at file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/rollup/dist/es/shared/node-entry.js:20936:32
at Object.logger [as onLog] (file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/rollup/dist/es/shared/node-entry.js:22822:9)
at ModuleLoader.handleInvalidResolvedId (file:///Users/basil_dot_work/IdeaProjects/VotersWA/node_modules/rollup/dist/es/shared/node-entry.js:21566:26)
When pointing my web browser to localhost:8080, I get an 500 error.
HTTP ERROR 500 jakarta.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
URI: http://localhost:8080/
STATUS: 500
MESSAGE: jakarta.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
SERVLET: com.vaadin.flow.server.startup.ServletDeployer
CAUSED BY: jakarta.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
CAUSED BY: com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
CAUSED BY: java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
CAUSED BY: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
Caused by:
jakarta.servlet.ServletException: com.vaadin.flow.server.ServiceException: java.lang.IllegalStateException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status
at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:400)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.eclipse.jetty.ee11.servlet.ServletHolder.handle(ServletHolder.java:750)
at org.eclipse.jetty.ee11.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1668)
at org.eclipse.jetty.ee11.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:199)
at org.eclipse.jetty.ee11.servlet.FilterHolder.doFilter(FilterHolder.java:205)
at org.eclipse.jetty.ee11.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1640)
at …
Powered by Jetty:// 12.1.1
My POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>project-base</artifactId>
<name>Project base for Vaadin</name>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<failOnMissingWebXml>false</failOnMissingWebXml>
<vaadin.version>25.0.0-alpha12</vaadin.version>
<drivers.downloader.phase>pre-integration-test</drivers.downloader.phase>
<jetty.version>12.1.1</jetty.version>
</properties>
<repositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!-- Repository used by many Vaadin add-ons -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>apache snapshots</id>
<url>https://repository.apache.org/content/repositories/snapshots</url>
</repository>
</repositories>
<pluginRepositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<type>pom</type>
<scope>import</scope>
<version>${vaadin.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
<artifactId>vaadin</artifactId>
<!-- Remove the following exclusion if you want to enable Hilla -->
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>hilla-dev</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Added to provide logging output as Vaadin uses -->
<!-- the unbound SLF4J no-operation (NOP) logger implementation -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench-junit5</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>jetty:run</defaultGoal>
<plugins>
<!-- Define newer versions of Java compiler and war plugin to better support the latest JDK versions. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<!-- Jetty plugin for easy testing without a server -->
<plugin>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<!-- If using IntelliJ IDEA with autocompilation, this
might cause lots of unnecessary compilations in the
background.-->
<scan>2</scan>
<!-- Use war output directory to get the webpack files -->
<webApp>
<allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
</webApp>
</configuration>
</plugin>
<!--
Take care of synchronizing java dependencies and imports in
package.json and main.js files.
It also creates webpack.config.js if not exists yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<dependencies>
<!-- Exclude development dependencies from production -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-dev</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<scan>0</scan>
<stopPort>8081</stopPort>
<stopWait>5</stopWait>
<stopKey>${project.artifactId}</stopKey>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests (*IT) after the server is started -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.4</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
<enableAssertions>true</enableAssertions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
If I switch the POM back to <vaadin.version>24.9.1</vaadin.version>, the example app runs correctly.