Hello,
I cannot render a React component using Astro integration
Here is the error I got:
7:57:20 [ERROR] Unable to render ReactCard!
This component likely uses <@&1055234544183287879>/react, <@&1055234544183287879>/preact, <@&1055234544183287879>/solid-js, <@&1055234544183287879>/vue or <@&1055234544183287879>/svelte,
but Astro encountered an error during server-side rendering.
Please ensure that ReactCard:
- Does not unconditionally access browser-specific globals like
windowordocument.
If this is unavoidable, use theclient:onlyhydration directive. - Does not conditionally return
nullorundefinedwhen 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.
Note that I'm not using globals like window or document
Also note that I'm using Cloudflare integration