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
Trying to render a React component with React integration + Svelte or Vue integration produce the following error:
Unable to render MyReactComponent!
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 MyReactComponent:
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.
Hint:
Browser APIs are not available on the server.
If the code is in a framework component, try to access these objects after rendering using lifecycle methods or use a `client:only` directive to make the component exclusively run on the client.
See https://docs.astro.build/en/guides/troubleshooting/#document-or-window-is-not-defined for more information.
Stack trace:
at renderFrameworkComponent (file:///Users/mrsquaare/Programming/Projects/MrSquaare/adorable-apogee/dist/chunks/astro/server_q5zkn5ym.mjs:1555:15)
at async renderComponent (file:///Users/mrsquaare/Programming/Projects/MrSquaare/adorable-apogee/dist/chunks/astro/server_q5zkn5ym.mjs:1726:10)
Astro Info
Describe the Bug
Trying to render a React component with React integration + Svelte or Vue integration produce the following error:
What's the expected result?
To render the React component
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-etw8ub3g
Participation
The text was updated successfully, but these errors were encountered: