\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_",[3151,3154],{"name":3152,"color":3153},"3.x","29bc7f",{"name":3138,"color":3155},"E99695",20064,"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":3163,"labels":3164,"number":3167,"owner":3141,"repository":3141,"state":3157,"title":3168,"updated_at":3169,"url":3170,"score":3171},"### 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_",[3165,3166],{"name":3152,"color":3153},{"name":3138,"color":3155},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":3173,"labels":3174,"number":3179,"owner":3141,"repository":3141,"state":3157,"title":3180,"updated_at":3181,"url":3182,"score":3183},"### 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_",[3175,3176],{"name":3138,"color":3155},{"name":3177,"color":3178},"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":3185,"number":3188,"owner":3141,"repository":3141,"state":3157,"title":3189,"updated_at":3190,"url":3191,"score":3192},[3186,3187],{"name":3152,"color":3153},{"name":3138,"color":3155},14280,"`pages` empty folder report error","2023-01-19T17:32:12Z","https://github.com/nuxt/nuxt/issues/14280",0.6266669,{"labels":3194,"number":3197,"owner":3141,"repository":3141,"state":3157,"title":3198,"updated_at":3199,"url":3200,"score":3201},[3195,3196],{"name":3152,"color":3153},{"name":3138,"color":3155},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":3203,"labels":3204,"number":3215,"owner":3141,"repository":3141,"state":3157,"title":3216,"updated_at":3217,"url":3218,"score":3219},"### 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_",[3205,3208,3211,3212],{"name":3206,"color":3207},"enhancement","8DEF37",{"name":3209,"color":3210},"good first issue","fbca04",{"name":3152,"color":3153},{"name":3213,"color":3214},"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":3221,"number":3227,"owner":3141,"repository":3141,"state":3157,"title":3228,"updated_at":3229,"url":3230,"score":3231},[3222,3223,3224],{"name":3152,"color":3153},{"name":3138,"color":3155},{"name":3225,"color":3226},"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":3233,"labels":3234,"number":3237,"owner":3141,"repository":3141,"state":3157,"title":3238,"updated_at":3239,"url":3240,"score":3241},"### 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```",[3235,3236],{"name":3138,"color":3155},{"name":3225,"color":3226},31203,"Static pages not working on nuxt 3 project","2025-03-05T19:47:06Z","https://github.com/nuxt/nuxt/issues/31203",0.64119416,{"description":3243,"labels":3244,"number":3246,"owner":3141,"repository":3141,"state":3157,"title":3247,"updated_at":3248,"url":3249,"score":3250},"### Environment\n\nStackblitz Nuxt 4\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-2kd99uue?file=app%2Fapp.vue\n\n### Describe the bug\n\nPages are not working. If you try to navigate to a page such as /about, it will not render, and you get the message:\n\n```\n WARN Create a Vue component in the pages/ directory to enable \u003CNuxtPage> \n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3245],{"name":3138,"color":3155},33043,"Pages is not working","2025-08-22T18:05:45Z","https://github.com/nuxt/nuxt/issues/33043",0.64248824,["Reactive",3252],{},["Set"],["ShallowReactive",3255],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f1PhKL8zfYuYcQhfJ_r2nrENFquweN_z6wYFHD0MZHlM":-1},"/nuxt/nuxt/20801"]