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