Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Front end build fails on routes.tsx #2715

Closed
donlyon opened this issue Sep 9, 2024 · 2 comments
Closed

Front end build fails on routes.tsx #2715

donlyon opened this issue Sep 9, 2024 · 2 comments
Assignees
Labels
bug Something isn't working hilla Issues related to Hilla investigation

Comments

@donlyon
Copy link

donlyon commented Sep 9, 2024

Describe the bug

I'm getting the following error during the front end build in production mode. It does not happen every time, but I first started getting it after updating from 24.5.0.alpha10 to 24.5.0.alpha12. I reverted but I'm still seeing it now, even after doing full cleans, and even fresh checkouts.

[ERROR] vite v5.4.0 building for production...
[ERROR] transforming...
[ERROR] src/main/frontend/generated/routes.tsx(37,24): error TS2307: Cannot find module 'Frontend/generated/file-routes' or its corresponding type declarations.
[ERROR] ✓ 1801 modules transformed.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.vaadin:vaadin-maven-plugin:24.5.0.alpha10:build-frontend (frontend) on project bifrost: Execution frontend of goal com.vaadin:vaadin-maven-plugin:24.5.0.alpha10:build-frontend failed: Vite process exited with non-zero exit code.
Stderr: 'vite v5.4.0 building for production...
transforming...
src/main/frontend/generated/routes.tsx(37,24): error TS2307: Cannot find module 'Frontend/generated/file-routes' or its corresponding type declarations.
✓ 1801 modules transformed.

Expected-behavior

Successful build

Reproduction

It happens during production builds, but not consistently

System Info

MacOS
Vaadin 24.5.0.alpha10/13
Spring boot 3.3.3

@donlyon donlyon added bug Something isn't working hilla Issues related to Hilla labels Sep 9, 2024
@cromoteca cromoteca self-assigned this Sep 11, 2024
@cromoteca
Copy link
Contributor

Hi, thank you for reporting.

I cannot replicate the issue. I tried upgrading to alpha 12 and 13, I see some errors related to peer dependencies. Those are known and fixed in #2699. I had to remove node_modules and package-lock.json to test the production build, but otherwise it works and I cannot see the error you mention.

There must be something specific to your project. If you are able to provide more details, that can help identifying the real issue.

@donlyon
Copy link
Author

donlyon commented Sep 11, 2024

Thanks for taking the time to try and reproduce this. I was able to get it resolved by synching up the versions of node on my Github Runner with my development box, then recreating package-lock.json with that version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla investigation
Projects
None yet
Development

No branches or pull requests

3 participants