In an Astro app, if you inherit a package that contains an Astro component and
if this component includes both a Lit component and an Astro import, an unrelated
error occurs. The error message is as follows:
There was an uncaught error in the middle of the stream while rendering /. TypeError: customElements.get(...) is not a constructor
.
- Server side rendering
output: server
has to be active for this error to occur. - Both the Astro import and the Lit import are required for the error to occur.
Use pnpm
to install the dependencies
pnpm i
pnpm build
and pnpm preview
, after this open the url from the webserver.