Closed pReya closed 3 months ago
I'm not really sure why you get the error, but if you add the renderer manually, it works:
import reactContainerRenderer from "@astrojs/react/server.js";
const container = await AstroContainer.create({ renderers });
container.addServerRenderer({renderer: reactContainerRenderer });
I'm not really sure why you get the error, but if you add the renderer manually, it works:
import reactContainerRenderer from "@astrojs/react/server.js"; const container = await AstroContainer.create({ renderers }); container.addServerRenderer({renderer: reactContainerRenderer });
Thanks, @ematipico! It does work, indeed. However I'm still getting a TypeScript error for the addServerRenderer()
call. Any idea how to type this properly? Can I just pass a random name, to satisfy TS?
Argument of type '{ renderer: NamedSSRLoadedRendererValue; }' is not assignable to parameter of type 'AddServerRenderer'.
Property 'name' is missing in type '{ renderer: NamedSSRLoadedRendererValue; }' but required in type '{ renderer: SSRLoadedRendererValue; name: string; }'.ts(2345)
index.d.ts(67, 5): 'name' is declared here.
(property) renderer: NamedSSRLoadedRendererValue
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I've tried to create a "full text" RSS feed with the Container API, according to @delucis example in this repository: https://github.com/delucis/astro-blog-full-text-rss
The only thing I've changed about his example:
src/pages/rss.xml.ts
)src/content/blog/first-post.mdx
fileNow, when you open the RSS feed (under the
/rss.xml
URL), you will get the following Astro error:What's the expected result?
The RSS feed should render as expected, without any errors.
Link to Minimal Reproducible Example
https://stackblitz.com/~/github.com/pReya/astro-blog-full-text-rss?file=src/pages/rss.xml.ts&initialPath=/rss.xml
Participation