\r\n \u003C/NuxtLayout>\r\n\u003C/template>\r\n```\r\ndid not change the problem that the error page didn't get the layout. This is the first bug in my opinion. So I did a workaround:\r\n```\r\n\u003Cscript setup lang=\"ts\">\r\nimport type { NuxtError } from '#app'\r\nimport DefaultLayout from \"/layouts/default.vue\"\r\nconst props = defineProps({\r\n error: Object as () => NuxtError\r\n})\r\n\u003C/script>\r\n\u003Ctemplate>\r\n \u003CDefaultLayout>\r\n \u003Cdiv>\r\n \u003Ch1>{{ \"Error \" + error?.statusCode }}\u003C/h1>\r\n \u003Cpre>{{ JSON.stringify(error, null, 4) }}\u003C/pre>\r\n \u003CNuxtLink to=\"/\">Go back home\u003C/NuxtLink>\r\n \u003C/div>\r\n \u003C/DefaultLayout>\r\n\u003C/template>\r\n```\r\nThis was ugly but worked however eventually I noticed another problem. I tried passing props from layout to page components and that wasn't working (second bug). So I fixed (?) the problem by replacing `\u003Cslot>` on the layout with `\u003CNuxtPage />`. This again worked but I faced another problem: Now the error page content (other than layout) isn't visible. So now the \"best\" choice I know I have is to have an error page without a layout, but that's not what I want. Do you confirm my bug reports? What should I do? Thanks.",[3166,3169,3170,3173],{"name":3167,"color":3168},"3.x","29bc7f",{"name":3151,"color":3152},{"name":3171,"color":3172},"needs reproduction","FBCA04",{"name":3174,"color":3175},"closed-by-bot","ededed",25982,"Layout issues (error page, slot/NuxtPage props)","2024-12-21T23:06:42Z","https://github.com/nuxt/nuxt/issues/25982",0.59259886,{"description":3182,"labels":3183,"number":3185,"owner":3157,"repository":3157,"state":3158,"title":3186,"updated_at":3187,"url":3188,"score":3189},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v20.17.0`\n- Nuxt Version: `3.13.2`\n- CLI Version: `3.14.0`\n- Nitro Version: `2.9.7`\n- Package Manager: `npm@10.8.2`\n- Builder: `-`\n- User Config: `-`\n- Runtime Modules: `-`\n- Build Modules: `-`\n\n### Reproduction\n\nMake a layout with noticeable parts (such as header). Add this to `error.vue`:\n```\n\u003Cscript setup lang=\"ts\">\nimport { useHead } from '#app'\nimport type { NuxtError } from '#app'\n\nconst props = defineProps\u003C{\n error: NuxtError\n}>()\n\nuseHead({\n title: `Error ${props.error.statusCode || 'Unknown'}`\n})\n\nconst handleError = () => {\n clearError({ redirect: '/' })\n}\n\u003C/script>\n\n\u003Ctemplate>\n \u003CNuxtLayout name=\"default\">\n \u003Cdiv class=\"error-container\">\n \u003Ch1>Error {{ props.error.statusCode || 'Unknown' }}\u003C/h1>\n \u003Cp>{{ props.error.message || 'An unexpected error occurred' }}\u003C/p>\n \u003Cbutton @click=\"handleError\">Go back to homepage\u003C/button>\n \u003C/div>\n \u003C/NuxtLayout>\n\u003C/template>\n```\nCause a 404 error to happen by going to a non-existent route.\n\nMy `layouts/default.vue` file:\n```\n\u003Ctemplate>\n \u003CNuxtLoadingIndicator color=\"#FFBC59\" />\n \u003CNavbar :language=\"language\" />\n \u003CNuxtPage :language=\"language\" />\n \u003CFooter :language=\"language\" />\n\u003C/template>\n// some other code\n```\n\nReproduction as a project: https://stackblitz.com/edit/github-nprqx2?file=layouts%2Fdefault.vue,error.vue,app.vue,pages%2Findex.vue,.gitignore\n\n### Describe the bug\n\nThe error message does not appear on the page unless I remove `\u003CNuxtLayout name=\"default\">` and `\u003C/NuxtLayout>` from error page. This is not what I want, I want error message inside the layout. I can achieve this by replacing `\u003CNuxtPage>` with `\u003Cslot>`, but that causes other problems (probably because props don't pass into the slot – should I make another bug report for that too?).\n\n### Additional context\n\nUsing a layout on an error page is supposed to work because documentation states:\n\n> you can still use layouts in the error file, by utilizing the [NuxtLayout](https://nuxt.com/docs/api/components/nuxt-layout) component and specifying the name of the layout\n\nBut I haven't found an example of that working. I am not 100% sure it's a bug, maybe I missed something.\n\n### Logs\n\n_No response_",[3184],{"name":3151,"color":3152},29284,"Using layout on error page causes error info to not appear","2024-10-05T18:46:02Z","https://github.com/nuxt/nuxt/issues/29284",0.59818494,{"description":3191,"labels":3192,"number":3195,"owner":3157,"repository":3157,"state":3158,"title":3196,"updated_at":3197,"url":3198,"score":3199},"\u003C!-- 💚 Thanks for your time to make Nuxt better with your feedbacks 💚\r\n\r\n**IMPORTANT** Before reporting a bug:\r\n\r\n- Please make sure that you have read through Nuxt documentation: https://nuxtjs.org\r\n- If issue is related to a module please create the issue in corresponding repository\r\n- Ensure using latest version of nuxt dependencies using `yarn upgrade nuxt` or `npm upgrade nuxt`\r\n\r\n👍 A properly detailed bug report can save a LOT of time and help fixing issues as soon as possible.\r\n-->\r\n\r\n### Versions\r\n\r\n- nuxt: v2.14.12\r\n- node: v10.16.3\r\n\r\n### Reproduction\r\n\r\n\u003C!--\r\nLink to a minimal test case based on one of:\r\n- A fork of https://template.nuxtjs.org\r\n- A GitHub repository that can reproduce the bug\r\nWithout a reproduction, it is so hard to address problem :(\r\n-->\r\n\r\n\u003Cdetails open>\r\nServer error page often appears, like this.\r\n\r\n I want to know the reason, why server error appears, and how can I avoid this page? Is it the client to change the configuration, or the server to optimize the interface?Thanks!\r\n\u003Cbr>\r\n\u003C!-- Attaching `nuxt.config`, dependencies, logs or code snippets would help to find the issue -->\r\n\u003C/details>\r\n\r\n",[3193,3194],{"name":3151,"color":3152},{"name":3154,"color":3155},8919,"Server error page","2023-01-22T15:38:48Z","https://github.com/nuxt/nuxt/issues/8919",0.5990927,{"labels":3201,"number":3204,"owner":3157,"repository":3157,"state":3158,"title":3205,"updated_at":3206,"url":3207,"score":3208},[3202,3203],{"name":3151,"color":3152},{"name":3154,"color":3155},10351,"No error raised when non-existing layout is set","2024-06-15T13:00:29Z","https://github.com/nuxt/nuxt/issues/10351",0.5993075,{"labels":3210,"number":3216,"owner":3157,"repository":3157,"state":3158,"title":3217,"updated_at":3218,"url":3219,"score":3220},[3211,3214,3215],{"name":3212,"color":3213},"stale","ffffff",{"name":3151,"color":3152},{"name":3154,"color":3155},7014,"Splitted layout with error page","2023-01-22T15:34:48Z","https://github.com/nuxt/nuxt/issues/7014",0.6047696,{"description":3222,"labels":3223,"number":3225,"owner":3157,"repository":3157,"state":3158,"title":3226,"updated_at":3227,"url":3228,"score":3229},"hi \r\n \"nuxt\": \"^2.4.0\"\r\n\r\n my error component in layouts directory :\r\n\r\n```\r\n\u003Ctemplate>\r\n \u003Cdiv class=\"__nuxt-error-page\">\r\n \u003Cdiv class=\"error\">\r\n {{message}}\r\n \u003C/div>\r\n \u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript>\r\n export default {\r\n layout: 'empty',\r\n name: 'error',\r\n props: {\r\n error: {\r\n type: Object,\r\n default: null\r\n }\r\n },\r\n\r\n computed: {\r\n statusCode() {\r\n return (this.error && this.error.statusCode) || 500\r\n },\r\n message() {\r\n return this.error.message || `Error`\r\n }\r\n }\r\n }\r\n\u003C/script>\r\n```\r\n\r\nand empty layout : \r\n\r\n\r\n```\r\n\r\n\u003Ctemplate>\r\n \u003Cnuxt/>\r\n\u003C/template>\r\n\r\n\u003Cscript>\r\n\r\n export default {\r\n name: \"empty\",\r\n }\r\n\u003C/script>\r\n```\r\n\r\n\r\nbut when i have error , error component use another layout .. for example, when I'm on the dashboard layout and an error occurs, error component mount on dashboard layout\r\n\r\n\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c9154\">#c9154\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3224],{"name":3154,"color":3155},5654,"error page layout not correctly applied","2023-01-18T20:12:59Z","https://github.com/nuxt/nuxt/issues/5654",0.6063882,{"labels":3231,"number":3234,"owner":3157,"repository":3157,"state":3158,"title":3235,"updated_at":3236,"url":3237,"score":3238},[3232,3233],{"name":3151,"color":3152},{"name":3154,"color":3155},7894,"Can not show correct 404 page in some cases","2023-01-22T15:36:07Z","https://github.com/nuxt/nuxt/issues/7894",0.61490226,{"description":3240,"labels":3241,"number":3245,"owner":3157,"repository":3157,"state":3158,"title":3246,"updated_at":3247,"url":3248,"score":3249},"### Version\n\n[2.4.0](https://github.com/nuxt.js/releases/tag/2.4.0)\n\n### Reproduction link\n\n[http://localhost:3000](http://localhost:3000)\n\n### Steps to reproduce\n\n1) Create the `layout/error.vue`\n2) Create the page which will call Axios via Vuex\n3) When calling API via Axios, the API return 404/500\n\n### What is expected ?\n\nThe error will pass to the custom Error page.\n\n### What is actually happening?\n\nIf user use nuxt-router to change the page (not SSR), the custom error page shown.\nBut if I refresh and view the SSR Page. The NuxtServerError Page will be shown in dev mode (yarn dev) and the default Server Error page when yarn start.\n\n### Additional comments?\n\nHere is my Axios Helper\n```\nimport axios from 'axios'\nconst myAxios = axios.create({\n headers: { 'Accept': 'application/json' }\n})\n\nmyAxios.interceptors.response.use((response) => {\n return response\n}, (error) => {\n\n const { response } = error\n const { status, statusText } = response\n if (process.client) {\n $nuxt.error({ message: statusText, statusCode: status })\n } else {\n // Any solution can access the $nuxt here?\n }\n return Promise.reject(error)\n})\n\nexport default myAxios\n```\n\nThe page\n\n```\nimport myAxios from 'PATH/TO/THIS/HELPER'\n..\n...\n..\n\nmyAxios.get('http://example.com')\n```\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This bug report is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c9332\">#c9332\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3242,3243,3244],{"name":3212,"color":3213},{"name":3151,"color":3152},{"name":3154,"color":3155},5904,"Error page not work on Nuxt Server Error","2023-01-22T15:33:07Z","https://github.com/nuxt/nuxt/issues/5904",0.61594415,{"labels":3251,"number":3256,"owner":3157,"repository":3157,"state":3158,"title":3257,"updated_at":3258,"url":3259,"score":3260},[3252,3255],{"name":3253,"color":3254},"enhancement","8DEF37",{"name":3154,"color":3155},6699,"Add client option to not replace current page component with \u003CNuxtError> component when there's an uncaught error","2023-02-14T11:37:17Z","https://github.com/nuxt/nuxt/issues/6699",0.6161947,["Reactive",3262],{},["Set"],["ShallowReactive",3265],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fzrLkmJxa5zlkZSX_2HG9RGMRSfFEdzKf_OqhhnpVktI":-1},"/nuxt/nuxt/7743"]