ColorPickerField

Hi, I’m using this component https://github.com/Juchar/color-picker-field-flow.

The component works fine in development mode but in production mode it doesn’t display. I’m using Vaadin v.14.8.4

How can I solve?

Please check your src/main/resources/application.properties file for vaadin.whitelisted-packages

https://vaadin.com/docs/latest/integrations/spring/configuration/#configure-the-scanning-of-packages

The issue could be the namespace is missing

I do not have application.properties file … what I have to add specifically in this file?

It’s here: https://github.com/vaadin/skeleton-starter-flow-spring/blob/v14/src/main/resources/application.properties

But I’ve noticed they have removed the comment from the v14 properties file, so likely not the culprit

Have you tried a mvn vaadin:dance before packaging your application?

like mvn clean vaadin:dance package -Pproduction

Nope, what does it do?

clean the frontend, e.g all npm packages etc and forces it to redownload them

see https://vaadin.com/docs/latest/production/production-build

I tried with mvn clean vaadin:dance package -Pproduction, but it didn’t work

In production still not diplayed

It’s the culprit, the package name isn’t whitelisted

given the vaadin starter 14 without the whitelist, it works for me in production mode

I just downloaded the vaadin 14 starter,
added

        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>

and

        <dependency>
            <groupId>com.github.Juchar</groupId>
            <artifactId>color-picker-field-flow</artifactId>
            <version>master-SNAPSHOT</version>
        </dependency>

to the pom.xml
and added the component to the MainView.java
It works fine in develop and production

If however you add a whitelist configuration to the application.properties, you need to add the namespace to it aswell, otherwise it will not work

mvn clean package spring-boot:run -Pproduction
image.png

Can you try this one? https://github.com/Juchar/color-picker-flow

This is my current library imported, the first repo was not correct