NuxtN
Nuxtβ€’3mo agoβ€’
4 replies
Elvin code

πŸ†˜ 500 SSR Error on Homepage (Cloudflare Pages)

Hey everyone πŸ‘‹

I’m getting a 500 SSR error in production and can’t figure out why.

πŸ› The issue

Error: 500 - Cannot read properties of undefined (reading 'console')

Occurs: Only on direct access to / or when refreshing the page

Works fine: When navigating from /login β†’ /

I'm redirecting from login -> home fine, but refreshing breaks

Environment: Nuxt 4.1.2 on Cloudflare Pages (preset: cloudflare-pages)

πŸ” Reproduction

You can check it here:
πŸ”— Repo: https://github.com/ElvinKyungu/linear-nuxt-fullstack/tree/develop
🌐 Preview: https://f7864481.linear-nuxt-fullstack.pages.dev/

❓ Questions

Should useToast() from @nuxt/ui work in SSR?

Is there a better pattern for handling toasts inside stores used in SSR?

Could a global middleware cause SSR store initialization issues?

Thanks a lot for your help! πŸ™
GitHub
A sleek and efficient project management interface inspired by Linear. Built with Nuxt.js, GSAP, Tailwindcss and and Nuxt UI, it enables seamless issue tracking, project management, and team collab...
GitHub - ElvinKyungu/linear-nuxt-fullstack at develop
Was this page helpful?