-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
🐛 BUG: client:only="lit" error: Failed to resolve module #2526
Comments
I get the same |
Thanks! We do not support I think this is something we probably just cannot possibly support. We don't know that I think what we need here is a good error message when we encounter a |
How can we use a client only component that we do not have a SSR strategy for? for example i want/need threejs and there is not content i plan on rendering. Also for the import even if the developer is responsible with including the is-inline script tag, that would be nice just ignore the custom tag and pass it through on the markup Here is an example that would benefit: https://github.com/rodydavis/astro-playground-elements |
Can this be worked around now that the Alternatively, can we simply just define a map file somewhere that can one day be auto-generated by Web Component Analyzer? |
Yes, given that we no longer support Going to close this issue given its age and the new approach, please open new issues as needed. |
Do you mind re-opening this issue? There doesn't seem to be a workaround because repro case based on the official templates: https://stackblitz.com/edit/github-jrtzpq?file=src%2Fpages%2Findex.astro&on=stackblitz |
well it seems to load the definition, but does not include the tag name w/ attributes / properties set |
Running into this as well |
Also seeing this issue. |
All my components are wrapped into a function for dependency injection: ---
import counter from '../components/Counter';
const context = {
// global data and function
};
const Counter = counter(context);
---
<html lang="en">
<body>
<Counter client:only="react" />
</body>
</html> That results in the error: Is there a workaround ? |
What version of
astro
are you using?0.22.0
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
I'm trying to use a client-only Lit element. Using the
client:only="lit"
attribute as in:<my-counter client:only="lit"></my-counter>
Throws the error:
Uncaught (in promise) TypeError: Failed to resolve module specifier ''
at index.astro?html-proxy&index=1.js:5:1
at async onLoad (only.ts:9:18)
I also tried using
@astrojs/renderer-lit
with the same outcome.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-bbch9k?file=src/pages/index.astro
The text was updated successfully, but these errors were encountered: