hilla icon indicating copy to clipboard operation
hilla copied to clipboard

Building Frontend issues & Missing generated services

Open iakovidva opened this issue 1 year ago • 1 comments

Describe the bug

Hey everyone,

I am facing unexpected issues when I am trying to build my project too often.

  1. For example, I am getting this error when running the vaadin:build-frontend task. image

I could normally find that file, but after running a clean-frontend and then build-frontend again it looks like it can't generate it. I haven't change anything in the code. I suspect that it has to do with the fact that I cleaned the project. I have tried to clean and build again the maven backend code, and then clean-frontend and build-frontend again but it failed. Why does it happen? Also tried to manually remove the /generated manually and then run again some tasks, (eg. prepare-frontend) and some times it works, luckily.

  1. I also have an issue generating the typescript for one Service, while the configuration of it is the same as the others who run successfully. Eg. This doesn't generate any file: image while the

@BrowserCallable @AnonymousAllowed @Service public class HelloWorldService {

public String sayHello(String name) {
    if (name.isEmpty()) {
        return "Hello stranger :)";
    } else {
        return "Hello " + name;
    }
}

}

which existed from hilla does.

I would like a more clear answer on how the /generated code is generated and what should be done before running the build-frontend task.

Expected-behavior

No response

Reproduction

General confusion building code. Just tried to create some new enums and classes and can't get them generated by hilla.

System Info

I am using java17, springboot 3.3.4 and vaadin 24.4.13.

iakovidva avatar Oct 10 '24 05:10 iakovidva

@iakovidva Could you share a minimal version of your project with us? We tried replicating the issue on multiple versions (24.4.8, 24.4.13, and 24.5.1) on a Windows machine, using clean-frontend and build-frontend commands both directly and through ./mvn in both production and development modes, but we couldn’t reproduce the problem.

If you’ve already resolved the issue, we’d also appreciate any insights on what worked.

krissvaa avatar Oct 28 '24 10:10 krissvaa