You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v5.0.9
Node v18.20.3
System Linux (x64)
Package Manager unknown
Output static
Adapter none
Integrations @astrojs/react
@astrojs/svelte
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
In an Astro project with both React and Svelte integrations installed, the following error appears when trying to render React components:
Unable to render ReactButton!
This component likely uses @astrojs/react, @astrojs/preact, @astrojs/solid-js, @astrojs/vue or @astrojs/svelte,
but Astro encountered an error during server-side rendering.
Please ensure that ReactButton:
1. Does not unconditionally access browser-specific globals like window or document.
If this is unavoidable, use the client:only hydration directive.
2. Does not conditionally return null or undefined when rendered on the server.
If you're still stuck, please open an issue on GitHub or join us at https://astro.build/chat.
The error appears even if no Svelte component is on the same page.
The error appears regardless of the client directive used (or when no client directive is used), except when using client:only (in which case the React component is rendered as expected).
What's the expected result?
The React component should be rendered as expected.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
In an Astro project with both React and Svelte integrations installed, the following error appears when trying to render React components:
The error appears even if no Svelte component is on the same page.
The error appears regardless of the client directive used (or when no client directive is used), except when using
client:only
(in which case the React component is rendered as expected).What's the expected result?
The React component should be rendered as expected.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-lritq8hm
Participation
The text was updated successfully, but these errors were encountered: