\r\n \u003C/NuxtLayout>\r\n\u003C/template>\r\n```\r\nChange the pages directory to something else in `nuxt.config.ts`.\r\n```ts\r\n// https://nuxt.com/docs/api/configuration/nuxt-config\r\nexport default defineNuxtConfig({\r\n dir: {\r\n pages: \"routes\"\r\n }\r\n});\r\n```\r\nMake sure to not have anything in the pages directory.\n\n### Describe the bug\n\nNuxt throws info message `Create a Vue component in the pages/ directory to enable \u003CNuxtPage>` instead of `Create a Vue component in the (pages dir)/ directory to enable \u003CNuxtPage>`.\n\n### Additional context\n\nLiterally no one cares, but I get annoyed by anything.\n\n### Logs\n\n_No response_",[2867,2870],{"name":2868,"color":2869},"3.x","29bc7f",{"name":2871,"color":2872},"pending triage","E99695",20064,"nuxt","closed","\u003CNuxtPage> info message does not take custom pages dir into account","2023-04-04T13:18:31Z","https://github.com/nuxt/nuxt/issues/20064",0.5849653,{"description":2881,"labels":2882,"number":2885,"owner":2874,"repository":2874,"state":2875,"title":2886,"updated_at":2887,"url":2888,"score":2889},"### Environment\n\nNuxt project info: \r\n\r\n------------------------------\r\n- Operating System: `Windows_NT`\r\n- Node Version: `v16.17.0`\r\n- Nuxt Version: `3.0.0-rc.11`\r\n- Nitro Version: `0.5.4`\r\n- Package Manager: `npm@8.19.2`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\n\n### Reproduction\n\n- Create a Nuxt module project:\r\n\r\n```\r\nnpx nuxi init -t module my-module\r\ncd my-module\r\nnpm i \r\nnpm run dev:prepare\r\n```\r\n\r\n- Make a call to `extendPages` within `module.ts` to add a page:\r\n\r\n```ts [module.ts]\r\nextendPages((pages) => {\r\n pages.push({\r\n name: 'module-page',\r\n path: '/:slug(.*)*',\r\n // @ts-ignore\r\n file: resolve(runtimeDir, './MyPage.vue')\r\n })\r\n})\r\n```\r\n- Add a page `~/src/runtime/MyPage.vue`:\r\n\r\n```vue [MyPage.vue]\r\n\u003Ctemplate>\r\n \u003Cdiv>Hello!\u003C/div>\r\n\u003C/template>\r\n```\r\n\r\n- Update `app.vue` to add `\u003CNuxtLayout>` and `\u003CNuxtPage>`:\r\n\r\n```vue [app.vue]\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003CNuxtLayout>\r\n \u003CNuxtPage />\r\n \u003C/NuxtLayout>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n\r\n- Run the project with `npm run dev` and note that the page has not loaded:\r\n```\r\nPlugin by my-module!\r\n√ Vite server hmr 4 files in 50.259ms\r\n[Vue warn]: Failed to resolve component: NuxtPage\r\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.\r\nPlugin by my-module!\r\n[Vue warn]: Component \u003CAnonymous> is missing template or render function.\r\n√ Vite server hmr 4 files in 143.147ms\r\n[Vue warn]: Failed to resolve component: NuxtPage\r\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.\r\nPlugin by my-module!\r\n```\n\n### Describe the bug\n\nNuxt cleverly strips out all router functionality if a project does not have a pages directory. However, this functionality is still removed if an installed module calls 'extendPages', so modules can't actually provide pages unless the project itself already has some, which may not always be the case.\r\n\r\nI think router functionality should be preserved by Nuxt if `extendPages` is called.\r\n\n\n### Additional context\n\nI am creating a module which creates a catch all page so I can do my own routing. I don't want to need to create a page in every project in order for my module's page to take effect. I can imagine other modules will want to act similarly, even if they're only providing more specific routes/pages.\n\n### Logs\n\n_No response_",[2883,2884],{"name":2868,"color":2869},{"name":2871,"color":2872},15060,"Nuxt does not include router functionality when a module calls extendPages unless the project has its own pages directory","2023-01-19T17:44:18Z","https://github.com/nuxt/nuxt/issues/15060",0.60862297,{"description":2891,"labels":2892,"number":2897,"owner":2874,"repository":2874,"state":2875,"title":2898,"updated_at":2899,"url":2900,"score":2901},"### Environment\r\n\r\njust stackblitz, there is no issue with environment \r\n``` \r\n System:\r\n OS: Linux 5.0 undefined\r\n CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz\r\n Memory: 0 Bytes / 0 Bytes\r\n Shell: 1.0 - /bin/jsh\r\n Binaries:\r\n Node: 16.14.2 - /usr/local/bin/node\r\n Yarn: 1.22.19 - /usr/local/bin/yarn\r\n npm: 7.17.0 - /usr/local/bin/npm\r\n npmPackages:\r\n nuxt: ^2.16.2 => 2.16.2 \r\n```\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-a2pdyd?file=modules/addpage/_.vue\r\n\r\n### Describe the bug\r\n\r\nI'm not sure if it is a bug but, when there is no 'pages' directory in the Nuxt.js application, modules cannot add or extend routes. \r\n\r\nPlease check reproduction. There is no pages directory and we can see \r\n```\r\n WARN No pages directory found in /home/projects/github-a2pdyd. Using the default built-in page.\r\n```\r\n\r\nBut if you add pages directory then page file from module will be applicable. \r\n\r\nI have an idea to check if the 'pages' directory doesn't exist and then change the pages directory. \r\n## Is there any other option to force enabling it?\r\n\r\n\r\nHere is my temporary solution\r\n```js\r\nif (!fs.existsSync(this.options.srcDir + '/' + this.options.dir.pages)) {\r\n this.options.dir.pages = relative(\r\n this.options.srcDir,\r\n resolve(__dirname, './pages/')\r\n );\r\n }\r\n```\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2893,2894],{"name":2871,"color":2872},{"name":2895,"color":2896},"2.x","d4c5f9",19699,"Modules can't add pages when pages directory not exist ","2024-06-30T09:21:58Z","https://github.com/nuxt/nuxt/issues/19699",0.6094277,{"labels":2903,"number":2906,"owner":2874,"repository":2874,"state":2875,"title":2907,"updated_at":2908,"url":2909,"score":2910},[2904,2905],{"name":2868,"color":2869},{"name":2871,"color":2872},14280,"`pages` empty folder report error","2023-01-19T17:32:12Z","https://github.com/nuxt/nuxt/issues/14280",0.6266669,{"labels":2912,"number":2915,"owner":2874,"repository":2874,"state":2875,"title":2916,"updated_at":2917,"url":2918,"score":2919},[2913,2914],{"name":2868,"color":2869},{"name":2871,"color":2872},13135,"If the dev server is running, nuxt wont configure vue-router if we add the pages directory with index.vue","2023-01-19T16:52:40Z","https://github.com/nuxt/nuxt/issues/13135",0.6338808,{"description":2921,"labels":2922,"number":2933,"owner":2874,"repository":2874,"state":2875,"title":2934,"updated_at":2935,"url":2936,"score":2937},"### Environment\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.0.0-rc.11`\r\n- Nitro Version: `0.5.4`\r\n- Package Manager: `npm@7.17.0`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\n1. Open this [StackBlitz](https://stackblitz.com/edit/https-github-comnuxtframeworkissues8177)\r\n2. See that no page is shown\r\n3. Expected: Showing the content of `Test.vue`\r\n4. Actual: Showing `\u003CNuxtWelcome>`\r\n\r\n### Describe the bug\r\n\r\nUsing `app/router.options.ts` without a `pages` folder (even with `pages: true` in `nuxt.config.ts`) does utilize the custom router.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2923,2926,2929,2930],{"name":2924,"color":2925},"enhancement","8DEF37",{"name":2927,"color":2928},"good first issue","fbca04",{"name":2868,"color":2869},{"name":2931,"color":2932},"pages","00DFB5",15163,"Using only `router.options.ts` should enable page mode","2023-01-19T17:45:31Z","https://github.com/nuxt/nuxt/issues/15163",0.63682866,{"labels":2939,"number":2945,"owner":2874,"repository":2874,"state":2875,"title":2946,"updated_at":2947,"url":2948,"score":2949},[2940,2941,2942],{"name":2868,"color":2869},{"name":2871,"color":2872},{"name":2943,"color":2944},"needs reproduction","FBCA04",14147,"[Vue Router warn]: No match found for location with path \"/null\"","2025-03-11T16:24:17Z","https://github.com/nuxt/nuxt/issues/14147",0.6378986,{"description":2951,"labels":2952,"number":2955,"owner":2874,"repository":2874,"state":2875,"title":2956,"updated_at":2957,"url":2958,"score":2959},"### Environment\n\n- Operating System: `Windows_NT`\n- Node Version: `v18.20.7`\n- Nuxt Version: `3.15.4`\n- CLI Version: `3.21.1`\n- Nitro Version: `2.10.4`\n- Package Manager: `pnpm@9.14.2`\n- Builder: `-`\n- User Config: `app`, `ssr`, `compatibilityDate`, `devtools`, `modules`, `css`, `runtimeConfig`, `nitro`, `vite`\n- Runtime Modules: `@nuxt/eslint@1.1.0`, `@nuxtjs/tailwindcss@6.13.1`, `@pinia/nuxt@0.10.1`, `@nuxt/image@1.9.0`, `nuxt-swiper@2.0.0`\n- Build Modules: `-`\n\n### Reproduction\n\n- Execute nuxt generate\n- Go to output folder\n- Open index.html file using browser without security\n- 404 page not found \n\n### Describe the bug\n\nHi,\n\nWe are working in nuxt project and we need to develop an static app without nodeJS app server. \n\nIf we use app.vue component all it's working ok but when we create pages folder we receive page not found error to manage different routes with vue-router\n\nWe try to configure prerender routes with nitro but it is not working. \n\nPlease, could you help me? \n\nThank you\n\n### Additional context\n\nWe are using the following nuxt configuration:\n\n```\nimport legacy from '@vitejs/plugin-legacy';\n\nexport default defineNuxtConfig({\n app: {\n cdnURL: './',\n },\n ssr: false,\n compatibilityDate: '2024-11-01',\n devtools: { enabled: false },\n modules: ['@nuxt/eslint', '@nuxtjs/tailwindcss', '@pinia/nuxt', '@nuxt/image', 'nuxt-swiper'],\n css: ['~/assets/css/main.css'],\n runtimeConfig: {\n public: {\n apiBase: process.env.API_BASE_URL,\n authorization: process.env.AUTH_TOKEN,\n },\n },\n vite: {\n plugins: [legacy()],\n },\n});```\n\nThis is the following project structure\n\n\n\n### Logs\n\n```shell-script\nBrk9iX9n.js:9599 [nuxt] error caught during app initialization H3Error: Page not found: /C:/Users/Documents/workspace/nuxt-project/.output/public/index.html\n at createError$1 (Brk9iX9n.js:10488:15)\n at Brk9iX9n.js:14599:54\n at fn (Brk9iX9n.js:9683:20)\n at Object.runWithContext (Brk9iX9n.js:4306:18)\n at callWithNuxt (Brk9iX9n.js:9687:24)\n at Brk9iX9n.js:9533:41\n at EffectScope.run (Brk9iX9n.js:280:16)\n at Object.runWithContext (Brk9iX9n.js:9533:31)\n at Brk9iX9n.js:14599:23\n at Brk9iX9n.js:14028:64\n```",[2953,2954],{"name":2871,"color":2872},{"name":2943,"color":2944},31203,"Static pages not working on nuxt 3 project","2025-03-05T19:47:06Z","https://github.com/nuxt/nuxt/issues/31203",0.64119416,{"description":2961,"labels":2962,"number":2969,"owner":2874,"repository":2874,"state":2875,"title":2970,"updated_at":2971,"url":2972,"score":2973},"### Environment\r\n\r\n------------------------------\r\n- Operating System: `Windows_NT`\r\n- Node Version: `v16.15.1`\r\n- Nuxt Version: `3.0.0-rc.11`\r\n- Nitro Version: `0.5.4`\r\n- Package Manager: `npm@8.12.2`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\n1. install a new nuxt 3 project\r\n2. change app.vue `\u003Ctemplate>\u003CNuxtPage>\u003Ctemplate/>`\r\n3. create index.vue file in pages/ directory\r\n``\u003Ctemplate>\u003Cdiv>home\u003C/div>\u003Ctemplate/>``\r\n5. Visit http://localhost:3000 show 404 page not found\r\n6. stop the serve and restart with `npm run dev`\r\n7. http://localhost:3000 works. show home\r\n8. then create test.vue in pages/\r\n``\u003Ctemplate>\u003Cdiv>test\u003C/div>\u003Ctemplate/>``\r\n9. Visit http://localhost:3000 show 404 page not found\r\n\r\n### Describe the bug\r\n\r\nnuxt/nuxt.js#13791 nuxt/nuxt.js#13725\r\nI saw that someone created the same issue six months ago. but the problem still exist\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2963,2964,2967],{"name":2868,"color":2869},{"name":2965,"color":2966},"bug","d73a4a",{"name":2968,"color":2944},"🔨 p3-minor",15141,"Routes not registered when page file created","2023-01-19T17:45:13Z","https://github.com/nuxt/nuxt/issues/15141",0.6477821,{"description":2975,"labels":2976,"number":2979,"owner":2874,"repository":2874,"state":2875,"title":2980,"updated_at":2981,"url":2982,"score":2983},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Windows_NT\r\n- Node Version: v20.14.0\r\n- Nuxt Version: 3.12.3\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: npm@10.8.1\r\n- Builder: -\r\n- User Config: compatibilityDate, devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\n1. Create a new npm nuxt project with git repository\r\n2. Change app.vue to \r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n \u003CNuxtLayout>\r\n \u003CNuxtPage />\r\n \u003C/NuxtLayout>\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n3. Create any layout and index page\r\n4. `npm run dev`\r\n\r\n### Describe the bug\r\n\r\napp.vue has both NuxtPage and NuxtLayout inside, but either only layout is loaded, or only page\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2977,2978],{"name":2871,"color":2872},{"name":2943,"color":2944},28146,"Nuxt page not loading","2024-11-08T23:00:23Z","https://github.com/nuxt/nuxt/issues/28146",0.6481702,["Reactive",2985],{},["Set"],["ShallowReactive",2988],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f1PhKL8zfYuYcQhfJ_r2nrENFquweN_z6wYFHD0MZHlM":-1},"/nuxt/nuxt/20801"]