\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.",[2876,2879,2880,2883],{"name":2877,"color":2878},"3.x","29bc7f",{"name":2861,"color":2862},{"name":2881,"color":2882},"needs reproduction","FBCA04",{"name":2884,"color":2885},"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":2892,"labels":2893,"number":2895,"owner":2867,"repository":2867,"state":2868,"title":2896,"updated_at":2897,"url":2898,"score":2899},"### 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_",[2894],{"name":2861,"color":2862},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":2901,"labels":2902,"number":2905,"owner":2867,"repository":2867,"state":2868,"title":2906,"updated_at":2907,"url":2908,"score":2909},"\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",[2903,2904],{"name":2861,"color":2862},{"name":2864,"color":2865},8919,"Server error page","2023-01-22T15:38:48Z","https://github.com/nuxt/nuxt/issues/8919",0.5990927,{"labels":2911,"number":2914,"owner":2867,"repository":2867,"state":2868,"title":2915,"updated_at":2916,"url":2917,"score":2918},[2912,2913],{"name":2861,"color":2862},{"name":2864,"color":2865},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":2920,"number":2926,"owner":2867,"repository":2867,"state":2868,"title":2927,"updated_at":2928,"url":2929,"score":2930},[2921,2924,2925],{"name":2922,"color":2923},"stale","ffffff",{"name":2861,"color":2862},{"name":2864,"color":2865},7014,"Splitted layout with error page","2023-01-22T15:34:48Z","https://github.com/nuxt/nuxt/issues/7014",0.6047696,{"description":2932,"labels":2933,"number":2935,"owner":2867,"repository":2867,"state":2868,"title":2936,"updated_at":2937,"url":2938,"score":2939},"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>",[2934],{"name":2864,"color":2865},5654,"error page layout not correctly applied","2023-01-18T20:12:59Z","https://github.com/nuxt/nuxt/issues/5654",0.6063882,{"labels":2941,"number":2944,"owner":2867,"repository":2867,"state":2868,"title":2945,"updated_at":2946,"url":2947,"score":2948},[2942,2943],{"name":2861,"color":2862},{"name":2864,"color":2865},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":2950,"labels":2951,"number":2955,"owner":2867,"repository":2867,"state":2868,"title":2956,"updated_at":2957,"url":2958,"score":2959},"### 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>",[2952,2953,2954],{"name":2922,"color":2923},{"name":2861,"color":2862},{"name":2864,"color":2865},5904,"Error page not work on Nuxt Server Error","2023-01-22T15:33:07Z","https://github.com/nuxt/nuxt/issues/5904",0.61594415,{"labels":2961,"number":2966,"owner":2867,"repository":2867,"state":2868,"title":2967,"updated_at":2968,"url":2969,"score":2970},[2962,2965],{"name":2963,"color":2964},"enhancement","8DEF37",{"name":2864,"color":2865},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",2972],{},["Set"],["ShallowReactive",2975],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fzrLkmJxa5zlkZSX_2HG9RGMRSfFEdzKf_OqhhnpVktI":-1},"/nuxt/nuxt/7743"]