Back to Nuxt

NUXT_E2007

docs/errors/e2007.md

4.5.2364 B
Original Source

E2007

setPageLayout() was called from a component's setup() during SSR. On the server the layout must be decided before the component renders, so changing it here produces incorrect SSR output.

Resolution

Set the layout from route middleware, or statically with definePageMeta({ layout: '...' }).

::read-more{to="/docs/api/utils/set-page-layout"} ::