vaadin-component-factory / selection-grid-flow

Add the functionality to Vaadin Grid to focus on a particular row and column and select a range of rows with SHIFT/CTRL Click
https://incubator.app.fi/selection-grid-flow-demo/
Apache License 2.0
5 stars 8 forks source link

Selection-Grid broken for Vaadin 24.0.0 #37

Closed danielstieger closed 1 year ago

danielstieger commented 1 year ago

The component seems not working correctly with vaadin 24.0.0. I noticed that the path to vaadin grid changed from

from @vaadin/vaadin-grid/src/vaadin-grid.js to @vaadin/grid/src/vaadin-grid.js

Changing that leads to "GridElement" is not exported by "node_modules/@vaadin/grid/src/vaadin-grid.js", imported by "frontend/src/vcf-selection-grid.js". file: /Users/danielstieger/migration/2020_3/turkuforms/frontend/src/vcf-selection-grid.js:23:9 21: import { ThemableMixin } from '@vaadin/vaadin-themable-mixin'; 22: import { ElementMixin } from '@vaadin/component-base/src/element-mixin'; 23: import { GridElement } from '@vaadin/grid/src/vaadin-grid.js'; ^ error during build: RollupError: "GridElement" is not exported by "node_modules/@vaadin/grid/src/vaadin-grid.js", imported by "frontend/src/vcf-selection-grid.js".

finaris-cs commented 1 year ago

Got similar issue, using SelectionGrid prevents my app from starting due to the changed path

[vite]: Rollup failed to resolve import "@vaadin/vaadin-grid/src/vaadin-grid.js" from "C:/intellij_workspace/XXXXX/Application/gui/main/frontend/generated/jar-resources/src/vcf-selection-grid.js". 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 error during build: Error: [vite]: Rollup failed to resolve import "@vaadin/vaadin-grid/src/vaadin-grid.js" from "C:/intellij_workspace/XXXXX/Application/gui/main/frontend/generated/jar-resources/src/vcf-selection-grid.js". 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 onRollupWarning (file:///C:/intellij_workspace/XXXXX/Application/gui/main/node_modules/vite/dist/node/chunks/dep-ae3fae1b.js:44781:19) at onwarn (file:///C:/intellij_workspace/XXXXX/Application/gui/main/node_modules/vite/dist/node/chunks/dep-ae3fae1b.js:44551:13) at Object.onwarn (file:///C:/intellij_workspace/XXXXX/Application/gui/main/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:25149:13) at ModuleLoader.handleInvalidResolvedId (file:///C:/intellij_workspace/XXXXX/Application/gui/main/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:23784:26) at file:///C:/intellij_workspace/XXXXX/Application/gui/main/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:23744:26 Mar 31, 2023 12:48:40 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class [com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener] java.lang.RuntimeException: Unable to initialize com.vaadin.flow.spring.VaadinServletContextInitializer$DevModeServletContextListener at com.vaadin.flow.spring.VaadinServletContextInitializer$FailFastServletContextListener.contextInitialized(VaadinServletContextInitializer.java:191) at com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener.lambda$contextInitialized$0(VaadinServletContextInitializer.java:213) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at com.vaadin.flow.spring.VaadinServletContextInitializer$CompositeServletContextListener.contextInitialized(VaadinServletContextInitializer.java:213) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5164) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:317) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:886) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:317) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:252) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:926) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Tomcat.start(Tomcat.java:485) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:129) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.(TomcatWebServer.java:110) at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:486) at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:210) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:183) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:161) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:578) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:432) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1291) at com.finaris.xxxxx.frontend.Application.main(Application.java:95) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) Caused by: java.util.concurrent.CompletionException: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status at com.vaadin.base.devserver.startup.DevModeInitializer.runNodeTasks(DevModeInitializer.java:383) at com.vaadin.base.devserver.startup.DevModeInitializer.lambda$initDevModeHandler$0(DevModeInitializer.java:313) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1804) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) at java.base/java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:387) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1840) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177) Caused by: com.vaadin.flow.server.ExecutionFailedException: Vite build exited with a non zero status at com.vaadin.flow.server.frontend.TaskRunDevBundleBuild.runFrontendBuildTool(TaskRunDevBundleBuild.java:956) at com.vaadin.flow.server.frontend.TaskRunDevBundleBuild.execute(TaskRunDevBundleBuild.java:131) at com.vaadin.flow.server.frontend.NodeTasks.execute(NodeTasks.java:301) at com.vaadin.base.devserver.startup.DevModeInitializer.runNodeTasks(DevModeInitializer.java:372) ... 10 more

jcgueriaud1 commented 1 year ago

There is a new release for Vaadin 24: https://github.com/vaadin-component-factory/selection-grid-flow/releases/tag/v3.0.0