NUXT_E2007

setPageLayout called on server within component.

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 in Docs > API > Utils > Set Page Layout.
Was this helpful?