\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_",[1984,1987],{"name":1985,"color":1986},"3.x","29bc7f",{"name":1988,"color":1989},"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.592333,{"description":1998,"labels":1999,"number":2004,"owner":1991,"repository":1991,"state":1992,"title":2005,"updated_at":2006,"url":2007,"score":2008},"### 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_",[2000,2001],{"name":1988,"color":1989},{"name":2002,"color":2003},"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.6099552,{"labels":2010,"number":2013,"owner":1991,"repository":1991,"state":1992,"title":2014,"updated_at":2015,"url":2016,"score":2017},[2011,2012],{"name":1985,"color":1986},{"name":1988,"color":1989},14280,"`pages` empty folder report error","2023-01-19T17:32:12Z","https://github.com/nuxt/nuxt/issues/14280",0.6152527,{"labels":2019,"number":2022,"owner":1991,"repository":1991,"state":1992,"title":2023,"updated_at":2024,"url":2025,"score":2026},[2020,2021],{"name":1985,"color":1986},{"name":1988,"color":1989},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.6187411,{"description":2028,"labels":2029,"number":2032,"owner":1991,"repository":1991,"state":1992,"title":2033,"updated_at":2034,"url":2035,"score":2036},"### 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_",[2030,2031],{"name":1985,"color":1986},{"name":1988,"color":1989},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.6279102,{"description":2038,"labels":2039,"number":2044,"owner":1991,"repository":1991,"state":1992,"title":2045,"updated_at":2046,"url":2047,"score":2048},"### 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```",[2040,2041],{"name":1988,"color":1989},{"name":2042,"color":2043},"needs reproduction","FBCA04",31203,"Static pages not working on nuxt 3 project","2025-03-05T19:47:06Z","https://github.com/nuxt/nuxt/issues/31203",0.63480824,{"labels":2050,"number":2054,"owner":1991,"repository":1991,"state":1992,"title":2055,"updated_at":2056,"url":2057,"score":2058},[2051,2052,2053],{"name":1985,"color":1986},{"name":1988,"color":1989},{"name":2042,"color":2043},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.6375494,{"description":2060,"labels":2061,"number":2064,"owner":1991,"repository":1991,"state":1992,"title":2065,"updated_at":2066,"url":2067,"score":2068},"### 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_",[2062,2063],{"name":1988,"color":1989},{"name":2042,"color":2043},28146,"Nuxt page not loading","2024-11-08T23:00:23Z","https://github.com/nuxt/nuxt/issues/28146",0.63838035,{"labels":2070,"number":2080,"owner":1991,"repository":1991,"state":1992,"title":2081,"updated_at":2082,"url":2083,"score":2084},[2071,2072,2075,2078],{"name":1985,"color":1986},{"name":2073,"color":2074},"bug","d73a4a",{"name":2076,"color":2077},"vite","3574D1",{"name":2079,"color":2043},"🔨 p3-minor",13307,"In Dev, New Pages Render a Blank Page Until You Restart The Server","2023-01-19T16:51:53Z","https://github.com/nuxt/nuxt/issues/13307",0.6475724,{"description":2086,"labels":2087,"number":2100,"owner":1991,"repository":1991,"state":1992,"title":2101,"updated_at":2102,"url":2103,"score":2104},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v20.8.1\r\n- Nuxt Version: 3.7.4\r\n- CLI Version: 3.9.0\r\n- Nitro Version: 2.6.3\r\n- Package Manager: pnpm@8.9.0\r\n- Builder: -\r\n- User Config: vue, devtools, telemetry, vite\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n------------------------------ \n\n### Reproduction\n\n1. Init new nuxt project\r\n2. Remove `app.vue`\r\n3. Add 2 pages: `index.vue` and `test.vue`\r\n4. Delete `test.vue` page\r\n5. Add `test2.vue` page\r\n6. Visit `/test2`\n\n### Describe the bug\n\nIt is similar to these reports:\r\nhttps://github.com/nuxt/nuxt/issues/15651\r\nhttps://github.com/nuxt/nuxt/issues/13725\r\n\r\nThis problem will not arise if we just create new pages. Only after we delete a page, then we see this issue appear.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2088,2089,2090,2093,2096,2097],{"name":1985,"color":1986},{"name":1988,"color":1989},{"name":2091,"color":2092},"dx","C39D69",{"name":2094,"color":2095},"pages","00DFB5",{"name":2042,"color":2043},{"name":2098,"color":2099},"closed-by-bot","ededed",23682,"Newly created page return 404 until manually reset HMR","2024-05-17T16:12:57Z","https://github.com/nuxt/nuxt/issues/23682",0.6476997,["Reactive",2106],{},["Set"],["ShallowReactive",2109],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"1PhKL8zfYuYcQhfJ_r2nrENFquweN_z6wYFHD0MZHlM":-1},"/nuxt/nuxt/20801"]