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 v20.11.1
System Windows (x64)
Package Manager npm
Output static
Adapter @astrojs/cloudflare
Integrations @astrojs/svelte
Describe the Bug
When developing the app locally everything works smoothly (because we are using nodejs for dev), but when we try to build the app without any changes it throws error
16:30:18 ▶ src/pages/index.astro
16:30:18 └─ /index.htmldocument is not defined
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.
this is when we pass any children to svelte component and try to render the children.
I have tested with other adapters (deno and node) things works expected, children passed are rendered and build is completed.
What's the expected result?
It should render the passed children in SSR and build should complete
Astro Info
Describe the Bug
When developing the app locally everything works smoothly (because we are using nodejs for dev), but when we try to build the app without any changes it throws error
16:30:18 ▶ src/pages/index.astro
16:30:18 └─ /index.htmldocument is not defined
Hint:
Browser APIs are not available on the server.
this is when we pass any children to svelte component and try to render the children.
I have tested with other adapters (deno and node) things works expected, children passed are rendered and build is completed.
What's the expected result?
It should render the passed children in SSR and build should complete
Link to Minimal Reproducible Example
https://github.com/rdlogout/cfastrodebug
Participation
The text was updated successfully, but these errors were encountered: