why flow-build-info.json contains relative paths ?

I produced a war using maven and starting from a startup project.
I see that inside the war a flow-build-info.json file is produced with relative paths.
Obviously the war can not work on everyone server and this is a great problem
I can’t explain how this thing can be.

Can you try building it with the production-mode profile? I.e., mvn … -Pproduction-mode

I tried both whith -Pproduction-mode or -Pproduction but I found always relative path

flow-build-info.json will indeed always contain local file paths even though those paths are not used for anything when productionMode in the same file is set to true.

I’ve created https://github.com/vaadin/flow/issues/6336 to remove that redundant information to reduce the risk of confusion.

I really don’t understand flow-build-info.json.
If I run maven install and get the war and put in production environment flow-build-info.json contains always local path and it can not work in the production server. I think I didn’t understand something or there is something important in vaadin 14 that just isn’t right.
Someone can help me to understand ?

Development mode needs to know the local file path because it will start a webpack development server that uses files directly from your file system so that frontend files can be edited without having to redeploy the application. For that reason, the path is put in flow-build-info.json.

Production mode will instead run webpack during the build and then the output will be available in the war (or jar) file. The logic that puts the path in flow-build-info.json was still also in use for a production build even though the running application didn’t need that information. This was fixed around a month ago in https://github.com/vaadin/flow/issues/6336 and released in Flow 2.0.11 and Vaadin 14.0.4.

Thank you Leif.
but is it necessary for Node.js to be installed on the production server?
Or is there any way why it is not.

Node.js should not be necessary when deploying a production build, i.e. something built using the production profile as defined in pom.xml that you get with anything from vaadin.com/start.

I’ve seen some reports about situation where the production mode setting doesn’t stick, e.g. https://github.com/vaadin/flow/issues/6759. Maybe you’re experiencing something similar?