[Solved] Nuxt3 500 error: Cannot read properties of undefined (reading ‘body’)

2024/07/03 13:27

Error

When I refresh the page, it shows something like 500 Internal Server Error : Cannot read properties of undefined (reading ‘body’)

Solution

You are trying to read dom before it was fully loaded.

1 Disable ssr:export default defineNuxtConfig({ ssr : false })

2 Use ClientOnly to wrap the component

Leave a Reply

Back to top