vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
922 stars 58 forks source link

Building Frontend issues & Missing generated services #2812

Open iakovidva opened 4 weeks ago

iakovidva commented 4 weeks ago

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.

2) 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.

krissvaa commented 1 week ago

@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.