1st tried to upgrade my main project. That failed at startup at building frontend:
09:31:49,818 DEBUG [com.ptsmc.vaadin.ServiceListener] (default task-2) sessionInit
09:31:49,820 ERROR [com.ptsmc.vaadin.CustomErrorHandler] (default task-2) Logged error: java.lang.IllegalStateException:
Failed to find the following css files in the `node_modules` or `C:\DeveloperArea\dawinci-main\vaadin-upgrade\ptsmc-widgetset\src\main\frontend` directory tree:
- leaflet/dist/leaflet.css
Check that they exist or are installed. If you use a custom directory for your resource files instead of the default `frontend` folder then make sure it's correctly configured (e.g. set 'vaadin.frontend.frontend.folder' property)
at deployment.ptsmc.ear//com.vaadin.flow.server.frontend.AbstractUpdateImports.getCssLines(AbstractUpdateImports.java:502)
at deployment.ptsmc.ear//com.vaadin.flow.server.frontend.AbstractUpdateImports.process(AbstractUpdateImports.java:376)
at deployment.ptsmc.ear//com.vaadin.flow.server.frontend.AbstractUpdateImports.run(AbstractUpdateImports.java:161)
at deployment.ptsmc.ear//com.vaadin.flow.server.frontend.TaskUpdateImports.execute(TaskUpdateImports.java:80)
at deployment.ptsmc.ear//com.vaadin.flow.server.frontend.NodeTasks.execute(NodeTasks.java:344)
at deployment.ptsmc.ear//com.vaadin.base.devserver.startup.DevModeInitializer.runNodeTasks(DevModeInitializer.java:356)
at deployment.ptsmc.ear//com.vaadin.base.devserver.startup.DevModeInitializer.lambda$initDevModeHandler$0(DevModeInitializer.java:297)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
To reduce the variables, I wanted to build an empty project, but…
No starter is available as far as I can see.
Tried to use mvn archetype, but it didn’t find anything from 24.5.0.beta5
Tried to update the version in an older starter. Had to guess at spring-boot. Picked 3.3.4
Everything built, but again it failed at startup:
2024-10-04T09:58:56.173+02:00 INFO 4304 --- [onPool-worker-1] c.v.f.s.frontend.TaskUpdatePackages : Running `npm install` to resolve and optionally download frontend dependencies. This may take a moment, please stand by...
2024-10-04T09:58:56.557+02:00 INFO 4304 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2024-10-04T09:58:58.024+02:00 INFO 4304 --- [onPool-worker-1] c.v.f.s.frontend.TaskUpdatePackages : using 'C:\Users\guttorm.vik\.vaadin\node\node.exe C:\Users\guttorm.vik\.vaadin\node\node_modules\npm\bin\npm-cli.js --no-update-notifier --no-audit --scripts-prepend-node-path=true --ignore-scripts install' for frontend package installation
2024-10-04T09:58:58.314+02:00 INFO 4304 --- [ restartedMain] c.v.f.s.DefaultDeploymentConfiguration :
Vaadin is running in DEVELOPMENT mode - do not use for production deployments.
2024-10-04T09:58:58.334+02:00 INFO 4304 --- [ restartedMain] c.vaadin.flow.spring.SpringInstantiator : The number of beans implementing 'I18NProvider' is 0. Cannot use Spring beans for I18N, falling back to the default behavior
2024-10-04T09:58:58.365+02:00 INFO 4304 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path '/'
2024-10-04T09:58:58.372+02:00 INFO 4304 --- [ restartedMain] com.example.application.Application : Started Application in 5.041 seconds (process running for 5.5)
2024-10-04T09:58:59.930+02:00 INFO 4304 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-10-04T09:58:59.931+02:00 INFO 4304 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2024-10-04T09:58:59.942+02:00 INFO 4304 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 0 ms
2024-10-04T10:00:56.993+02:00 INFO 4304 --- [onPool-worker-1] c.v.f.s.frontend.TaskUpdatePackages : Frontend dependencies resolved successfully.
2024-10-04T10:00:59.051+02:00 INFO 4304 --- [onPool-worker-1] c.v.f.s.frontend.TaskCopyFrontendFiles : Copying frontend resources from jar files ...
2024-10-04T10:00:59.216+02:00 INFO 4304 --- [onPool-worker-1] c.v.f.s.frontend.TaskCopyFrontendFiles : Visited 20 resources. Took 164 ms.
2024-10-04T10:00:59.554+02:00 INFO 4304 --- [onPool-worker-1] c.v.f.s.frontend.TaskRunDevBundleBuild : Creating a new development mode bundle. This can take a while but will only run when the project setup is changed, addons are added or frontend files are modified
2024-10-04T10:01:08.698+02:00 ERROR 4304 --- [onPool-worker-1] c.v.f.s.frontend.TaskRunDevBundleBuild : Command `C:\Users\guttorm.vik\.vaadin\node\node.exe C:\DeveloperArea\vaadin\starter-express\node_modules\vite\bin\vite.js build` failed:
vite v5.4.8 building for production...
transforming...
Comment replacement failed to change anything
? 557 modules transformed.
x Build failed in 4.55s
error during build:
node_modules/@vaadin-component-factory/vcf-nav/src/vcf-nav.ts (13:0): Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead. (Note that you need plugins to import files that are not JavaScript)
file: C:/DeveloperArea/vaadin/starter-express/node_modules/@vaadin-component-factory/vcf-nav/src/vcf-nav.ts:13:0
11: let id = 0;
12:
13: @customElement('vcf-nav')
^
14: export class Nav extends LitElement {
15: @property({ type: Boolean, reflect: true })
at getRollupError (file:///C:/DeveloperArea/vaadin/starter-express/node_modules/vite/node_modules/rollup/dist/es/shared/parseAst.js:395:41)
at ParseError.initialise (file:///C:/DeveloperArea/vaadin/starter-express/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:13231:28)
at convertNode (file:///C:/DeveloperArea/vaadin/starter-express/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:14939:10)
at convertProgram (file:///C:/DeveloperArea/vaadin/starter-express/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:14185:12)
at Module.setSource (file:///C:/DeveloperArea/vaadin/starter-express/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:15925:24)
at async ModuleLoader.addModuleSource (file:///C:/DeveloperArea/vaadin/starter-express/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:19797:13)