-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable to resolve reference $lit npm error #18792
Comments
It doesn't look like this is exactly correct anymore in docs side:
If docs needs both, it's already adding react deps as react is default and Flow brings them in automatically. So we are missing the mentioned '@vaadin/hilla-lit-form' dependency now instead. I tested this and it fixes the original issue. But then I get tons of other compilation errors like this:
|
And this, from earlier in the logs:
Maybe endpoints are not generated and they should? It's not hilla app in sense of Flow's auto-detection as there's no hilla views present. Check routes.tsx and you see that it has just serverside views which is auto-detected by Flow as "Hilla not used", which means no endpoint generators run in NodeTasks. However this worked with alpha4. This change was added last week, EDIT it was not yet included in alpha4 apparently. |
When I try to run vaadin:generate goal, it fails to this weird error. |
Tried with these missing dependencies/devDependencies that were still in alpha4 but vanished with alpha5 in package.json but no help:
|
With this trick, Flow thinks it's using Hilla and application works with couple warnings about missing properties due to this trick:
|
So to fix the docs repo, we need to apply the following:
There is still a |
The |
Empty route in routes.tsx is workaround for Flow hilla detection with alpha5. Also, adds missing `@vaadin/hilla-lit-form` dependency to package.json. Related-To: vaadin/flow#18792
The workaround |
* chore: make app detected as Hilla in use Empty route in routes.tsx is workaround for Flow hilla detection with alpha5. Also, adds missing `@vaadin/hilla-lit-form` dependency to package.json. Related-To: vaadin/flow#18792 * chore: removed hack that added hilla deps in package.json Flow adds these automatically. --------- Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
Description of the bug
Docs project doesn't start in production mode and fails with
if one upgrades to Vaadin 24.4.0.alpha5.
It might be a case that some Hilla dependency is declared and installed, but it depends on Lit and fail, because cannot find Lit package.
E.g.
hilla-generator-plugin-model
has a peer dependency to@vaadin/hilla-lit-form
and nobody is installing@vaadin/hilla-lit-form
when Hilla is not detected. Buthilla-generator-plugin-model
is still installed.Vaadin should add Hilla dependencies consistently, or not add them at all.
This might be also an issue in the docs project itself having Hilla deps leftovers.
See also the discussion in Slack.
Expected behavior
Docs project starts with 24.4.0.alpha5.
Minimal reproducible example
Upgrade https://github.com/vaadin/docs/ to 24.4.0.alpha5 and start it.
Versions
The text was updated successfully, but these errors were encountered: