Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI is broken when application is packaged using maven with production profile #20246

Open
Tymur-Lohvynenko-Epicor opened this issue Oct 14, 2024 · 3 comments

Comments

@Tymur-Lohvynenko-Epicor

Description of the bug

When I package an application using mvn clean package -P production, a page is not shown or shown with broken styles.
In logs I see messages:

2024-10-14T16:06:10.233+03:00 ERROR 32784 --- [io-8080-exec-10] c.v.flow.component.internal.UIInternals  : The component class com.vaadin.flow.component.button.Button includes '@vaadin/button/src/vaadin-button.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(Button.class) where it is used.
2024-10-14T16:06:10.233+03:00 ERROR 32784 --- [io-8080-exec-10] c.v.flow.component.internal.UIInternals  : The component class com.vaadin.flow.component.textfield.TextField includes '@vaadin/text-field/src/vaadin-text-field.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(TextField.class) where it is used.
2024-10-14T16:06:10.233+03:00 ERROR 32784 --- [io-8080-exec-10] c.v.flow.component.internal.UIInternals  : The component class org.vaadin.example.TestView includes './views/my-view.ts' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(TestView.class) where it is used.
2024-10-14T16:06:33.081+03:00 ERROR 32784 --- [nio-8080-exec-4] c.v.flow.component.internal.UIInternals  : The component class com.vaadin.flow.component.orderedlayout.VerticalLayout includes '@vaadin/vertical-layout/src/vaadin-vertical-layout.js' but this file was not included when creating the production bundle. The component will not work properly. Check that you have a reference to the component and that you are not using it only through reflection. If needed add a @Uses(VerticalLayout.class) where it is used.

Expected behavior

The application is packaged correctly and I can open pages.

Minimal reproducible example

See https://github.com/Tymur-Lohvynenko-Epicor/vaadin24-production-mode-bug, it is just starter with the one view that was added using Vaadin Designer.

Versions

  • Vaadin / Flow version: 24.4.13
  • Java version: 17
  • OS version: Windows 11
  • Browser version (if applicable): Google Chrome Version 129.0.6668.101 (Official Build) (64-bit)
  • Application Server (if applicable):
  • IDE (if applicable): IntelliJ IDEA 2024.2.3 (Ultimate Edition)
@Legioth
Copy link
Member

Legioth commented Oct 14, 2024

Duplicate of #19633

@Legioth Legioth marked this as a duplicate of #19633 Oct 14, 2024
@Legioth
Copy link
Member

Legioth commented Oct 14, 2024

Or maybe not exactly the same since the use of Kotlin might have an impact here.

@mcollovati
Copy link
Collaborator

mcollovati commented Oct 14, 2024

The configuration of the kotlin-maven-plugin must be put before the vaadin-maven-plugin, otherwise the build-frontend goal will not find the compiled kotlin classes, since they both run in compile phase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants