How to build a working jar file in Vaadin 14 + Spring Boot?
Asked Answered
E

1

6

Im trying to run my Vaadin14 project to production and my application cant find any vaadin flow components. I have a default application.properties and POM, and downloaded it from here https://vaadin.com/start/latest. I already have tried,

delete node modules mvn clean mvn clean install -Pproduction mvn clean package -Pproduction

and I get this error

Failed to find the following imports in the `node_modules` tree:
  - @vaadin/flow-frontend/contextMenuConnector-es6.js
  - @vaadin/flow-frontend/comboBoxConnector.js
  - @vaadin/flow-frontend/gridConnector.js
  - @vaadin/flow-frontend/contextMenuConnector.js
  - @vaadin/flow-frontend/flow-component-renderer.js
  - @vaadin/flow-frontend/gridConnector-es6.js
  - @vaadin/flow-frontend/comboBoxConnector-es6.js
  - @vaadin/flow-frontend/vaadin-grid-flow-selection-column.js

If the build fails, check that npm packages are installed.

To fix the build remove node_modules directory to reset modules. In addition you may run npm install to fix node_modules tree structure.

TIA

Elexa answered 12/11, 2019 at 0:17 Comment(0)
E
1

nvm guys, already found the answer.. Vaadin 14.0.11v

add this to your application.properties

vaadin.productionMode = true <----- comment this line when in dev mode

spring.servlet.multipart.enabled = false

Elexa answered 12/11, 2019 at 2:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.