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

Hilla packages are not installed when ReactAdapter+Endpoint is used without React views #20959

Closed
Tracked by #7151
mshabarov opened this issue Feb 6, 2025 · 1 comment

Comments

@mshabarov
Copy link
Contributor

Describe the bug

This enhancement has been done to how Hilla discovers endpoints and installs needed packages.

I've just tested this with the 24.7 pre-release and it seems broken, I got:

Error: Cannot find module 'xxx/skeleton-starter-flow-spring/node_modules/@vaadin/hilla-generator-cli/bin/index.js'
    at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
    at Function._load (node:internal/modules/cjs/loader:1075:27)
    at TracingChannel.traceSync (node:diagnostics_channel:322:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
    at node:internal/main/run_main_module:36:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

and node_modules/@vaadin indeed has no Hilla packages installed.

Application fails to start.

Configuration (see attached branch):

  • ReactAdapterElement that uses Hilla Endpoint
  • Hilla Endpoint
  • ReactAdapterComponent that used as a route
  • no React views

Expected-behavior

Application should install Hilla packages and start normally when Endpoint is used from ReactAdapterElement.

Reproduction

Can be reproduced with this branch https://github.com/vaadin/skeleton-starter-flow-spring/tree/react-adapter-with-endpoint. Just start the app with mvn and you'll see the error.

System Info

Vaadin 24.7.0.alpha8.

@tepi
Copy link
Contributor

tepi commented Feb 25, 2025

Closing due to reverting #20289

@tepi tepi closed this as completed Feb 25, 2025
@github-project-automation github-project-automation bot moved this from ⚒️ In progress to Done in Vaadin Flow ongoing work (Vaadin 10+) Feb 25, 2025
@github-project-automation github-project-automation bot moved this from 🔖 High Priority (P1) to ✅ Closed in Vaadin Flow bugs & maintenance (Vaadin 10+) Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants