\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n\r\nSetup pages directory like this:\r\n```\r\npages\r\n├── [username]\r\n│ └── [page].vue\r\n├── [username].vue\r\n└── index.vue\r\n```\r\n\r\nHere it is attached as zip:\r\n[pages.zip](https://github.com/nuxt/nuxt/files/13848306/pages.zip)\r\n\r\nlocalhost:3000 (correct)\r\n\r\n\r\nlocalhost:3000/myUser (correct)\r\n\r\n\r\nlocalhost:3000/myUser/myPage (incorrect)\r\n\r\n\r\nIt is showing `[username].vue`. I expect it to be showing `[page].vue` like this\r\n\r\n\r\nIt does work if I delete [username].vue.\r\n\r\n\r\n### Describe the bug\r\n\r\nA nested directory structure like this\r\n\r\n```\r\npages\r\n├── [username]\r\n│ └── [page].vue\r\n├── [username].vue\r\n└── index.vue\r\n```\r\n\r\nFails to render localhost:3000/myUser/myPage as [page].vue. It renders [username.vue].\r\n\r\nI RTFM, and I'm pretty sure this is how to set it up, but if I got it wrong please let me know.\r\n\r\nThanks!\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[1984,1987,1990],{"name":1985,"color":1986},"good first issue","fbca04",{"name":1988,"color":1989},"dx","C39D69",{"name":1991,"color":1992},"🍰 p2-nice-to-have","0E8A16",25077,"nuxt","open","Warn in dev mode if nested route without `\u003CNuxtPage />` exists","2024-06-30T11:06:22Z","https://github.com/nuxt/nuxt/issues/25077",0.6902817,{"labels":2001,"number":2005,"owner":1994,"repository":1994,"state":2006,"title":2007,"updated_at":2008,"url":2009,"score":2010},[2002],{"name":2003,"color":2004},"2.x","d4c5f9",6626,"closed","What is the best way to test routes on Nuxt with Jest?","2024-03-30T23:02:11Z","https://github.com/nuxt/nuxt/issues/6626",0.65127915,{"description":2012,"labels":2013,"number":2015,"owner":1994,"repository":1994,"state":2006,"title":2016,"updated_at":2017,"url":2018,"score":2019},"I'm trying to discover `nuxt` CLI capabilities as for every other npm lib (I wanted to know whether there is possibility to point to `nuxt.config.js` from other place). So I try:\r\n1. `./node_modules/.bin/nuxt --help` (with `nuxt` in dependencies in `package.json`)\r\n2. `nuxt --help` (with `nuxt` installed globally)\r\nIn both cases I get:\r\n```\r\n> No `pages` directory found. Did you mean to run `nuxt` in the parent (`../`) directory?\r\n```\r\nand nothing more :-(\r\n\r\nIt would be great to have possibility to call `nuxt` from any place, so it would fail on `nuxt build` maybe, but not on `nuxt --help` etc.\r\n\r\nBTW: I have `pages` directory same directory as where I run `nuxt --help`, but same error appears... But it's outside the scope of this issue.\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://nuxtjs.cmty.io\">Nuxt.js\u003C/a> community (\u003Ca href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c468\">#c468\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2014],{"name":2003,"color":2004},539,"Allow calling nuxt without `pages` directory","2023-01-18T15:39:30Z","https://github.com/nuxt/nuxt/issues/539",0.65546685,{"description":2021,"labels":2022,"number":2027,"owner":1994,"repository":1994,"state":2006,"title":2028,"updated_at":2029,"url":2030,"score":2031},"### 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_",[2023,2026],{"name":2024,"color":2025},"pending triage","E99695",{"name":2003,"color":2004},19699,"Modules can't add pages when pages directory not exist ","2024-06-30T09:21:58Z","https://github.com/nuxt/nuxt/issues/19699",0.6599276,{"description":2033,"labels":2034,"number":2038,"owner":1994,"repository":2039,"state":2006,"title":2040,"updated_at":2041,"url":2042,"score":2043},"If I do not include a `nuxt.condfig.ts` in my root and configure vitest like so:\r\n```\r\nimport { fileURLToPath } from 'node:url'\r\nimport { defineVitestConfig } from 'nuxt-vitest/config'\r\n\r\nexport default defineVitestConfig({\r\n test: {\r\n coverage: {\r\n reportsDirectory: '../coverage',\r\n provider: 'c8',\r\n include: ['src/**'],\r\n exclude: ['src/**/*.spec.ts', 'src/**/*.test.ts', 'src/**/*.d.ts'],\r\n all: true\r\n },\r\n environmentOptions: {\r\n nuxt: {\r\n rootDir: fileURLToPath(new URL('./playground', import.meta.url))\r\n }\r\n },\r\n resolveSnapshotPath (path: string, extension: string) {\r\n return path + extension\r\n },\r\n setupFiles: ['./setup.ts']\r\n }\r\n})\r\n```\r\n\r\nI get\r\n```\r\nError: Failed to load nuxt-vitest module. You may need to add it to your nuxt.config.\r\n```\r\n\r\nWhere there is a nuxt config in my module's playground which includes `nuxt-vitest`",[2035],{"name":2036,"color":2037},"vitest-environment","b60205",574,"test-utils","allow configuring nuxt rootDir and overrides does not appear to work","2023-12-02T00:27:09Z","https://github.com/nuxt/test-utils/issues/574",0.66195995,{"description":2045,"labels":2046,"number":2048,"owner":1994,"repository":1994,"state":2006,"title":2049,"updated_at":2050,"url":2051,"score":2052},"Hello. I am truying to run `npm run dev --host 0.0.0.0` but receive an error\r\n\r\n```\r\n> No `pages` directory found. Did you mean to run `nuxt` in the parent (`../`) directory?\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! errno 1\r\n```\r\n\r\nHow to make nuxt dev server available on local network for testing?\n\n\u003C!--cmty-->\u003C!--cmty_prevent_hook-->\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This question is available on \u003Ca href=\"https://nuxtjs.cmty.io\">Nuxt.js\u003C/a> community (\u003Ca href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1218\">#c1218\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2047],{"name":2003,"color":2004},1375,"Doesn't bind to 0.0.0.0","2023-01-18T15:41:42Z","https://github.com/nuxt/nuxt/issues/1375",0.6633216,{"description":2054,"labels":2055,"number":2057,"owner":1994,"repository":1994,"state":2006,"title":2058,"updated_at":2059,"url":2060,"score":2061},"I changed nuxt js folder structure is here. I am getting Error: Couldn’t find a pages directory in D:\\sample. Please create one under the project root how do I access pages\r\n\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/c7654\">#c7654\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[2056],{"name":2003,"color":2004},3820,"Nuxt js Error: Couldn’t find a pages directory","2023-01-18T16:26:36Z","https://github.com/nuxt/nuxt/issues/3820",0.66369516,{"description":2063,"labels":2064,"number":2065,"owner":1994,"repository":2039,"state":2006,"title":2066,"updated_at":2067,"url":2068,"score":2069},"Trying to get the test-utils to work, but after adding the preset, JEST simply won't run, saying that the test utils cannot be found.\r\n\r\nThis is straight from the docs. I've tried a bunch of different versions, and simply cannot get them to work. This is required (I think) in order to get the global function calls (such as definePageMeta) to work in tests.\r\n\r\n> ● Validation Error:\r\n>\r\n> Preset @nuxt/test-utils not found.\r\n>\r\n> Configuration Documentation:\r\n> https://jestjs.io/docs/configuration.html\r\n\r\nThe test utils are installed.\r\n\r\nAny ideas?",[],280,"Preset @nuxt/test-utils not found.","2023-12-02T00:18:11Z","https://github.com/nuxt/test-utils/issues/280",0.67472595,{"description":2071,"labels":2072,"number":2077,"owner":1994,"repository":1994,"state":2006,"title":2078,"updated_at":2079,"url":2080,"score":2081},"### Environment\n\n- Operating System: Darwin\r\n- Node Version: v18.20.1\r\n- Nuxt Version: 3.6.5\r\n- Nitro Version: 2.5.2\r\n- Package Manager: yarn@4.1.0\r\n- Builder: vite\r\n- User Config: srcDir, buildDir, modules, ssr, nitro, serverHandlers, css, components, imports, build, builder, typescript, vue, hooks\r\n- Runtime Modules: @nuxt/test-utils/module@3.12.0\r\n- Build Modules: -\n\n### Reproduction\n\nUnfortunately I could not reproduce this behaviour in a fresh repo.\n\n### Describe the bug\n\nUsing `defineVitestConfig` from `@nuxt/test-utils` gives me some errors on random(?) test files located in a specific folder (`./src/plugins/` in this case). It seems that vitest doesn't find those tests inside this directory (`No test suite found in file /omniweb/gsd/src/plugins/frontend-commons.spec.ts`). I tried to place a simple `test.spec.ts` inside with a basic test but it doesn't pick that up either.\r\nHowever if I move those test files to another directory at the same level it runs those test. If I rename the folder to `plugins` it again does not run those test files...\r\n\r\nI really can't imagine what's going on here. Are there some forbidden path patterns for some reason?\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2073,2076],{"name":2074,"color":2075},"3.x","29bc7f",{"name":2024,"color":2025},26898,"`defineVitestConfig` from `@nuxt/test-utils` is not a drop-in replacement for `defineConfig` from `vite` (`No test suite found in file`)","2024-04-23T07:13:27Z","https://github.com/nuxt/nuxt/issues/26898",0.6776042,{"description":2083,"labels":2084,"number":2085,"owner":1994,"repository":2039,"state":2006,"title":2086,"updated_at":2087,"url":2088,"score":2089},"This is my test as per the instructions on [the setup guide](https://test-utils.nuxtjs.org/api-reference/app-testing) and am receiving the error `server is not enabled` in response.\r\n\r\n```\r\nimport { get, setupTest } from '@nuxt/test-utils';\r\n\r\ndescribe('Server Side Rendering', () => {\r\n setupTest({ server: true });\r\n\r\n test('renders the index page', async () => {\r\n const page = await get('/');\r\n console.log(page);\r\n });\r\n});\r\n```\r\nAre there any suggestions as to what the issue may be?",[],319,"Documentation/Installation Guide Errors with Initial Test","2023-12-02T00:13:10Z","https://github.com/nuxt/test-utils/issues/319",0.6830459,["Reactive",2091],{},["Set"],["ShallowReactive",2094],{"TRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"sGHexMFO-kWyuhOXHCfFFdOepJ5Njk-MTCm-YosmmQ8":-1},"/nuxt/test-utils/279"]