\n\n### Workaround\nUsing `defineVitestConfig` and hoisting the configuration up to root works fine. Unfortunately I'd need to run three Vitest tasks and couldn't make use of the `projects` functionality.\n\nFor example:\n\n```\npnpm vitest --config vitest.browser.config.ts\npnpm vitest --config vitest.unit.config.ts\npnpm vitest --config vitest.e2e.config.ts\n# 😔\n```\n\n---\n\nSo, I can't figure out how to get it working. I've tried different combinations, singular projects, and using the deprecated `workspaces` key. The method `defineVitestProject` isn't documented and I've read through the code and I'm not really sure why I'm getting an error.\n\n### Nuxt Info\n\n```\n- Operating System: `Darwin`\n- Node Version: `v22.14.0`\n- Nuxt Version: `3.17.5`\n- CLI Version: `3.25.1`\n- Nitro Version: `2.11.12`\n- Package Manager: `pnpm@10.11.1`\n- Builder: `-`\n- User Config: `compatibilityDate`, `modules`\n- Runtime Modules: `@nuxt/test-utils/module@3.19.1`\n- Build Modules: `-`\n```\n\n### Additional information\n\n- [x] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [x] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\n- [x] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[3018],{"name":3019,"color":3020},"pending triage","5D08F5",1322,"nuxt","test-utils","open","Support Vitest `projects` option for Browser Mode","2025-06-18T13:51:03Z","https://github.com/nuxt/test-utils/issues/1322",0.6325923,{"description":3030,"labels":3031,"number":3033,"owner":3022,"repository":3023,"state":3024,"title":3034,"updated_at":3035,"url":3036,"score":3037},"### Environment\n\n- Operating System: `Windows_NT`\n- Node Version: `v22.16.0`\n- Nuxt Version: `3.17.5`\n- CLI Version: `3.25.1`\n- Nitro Version: `2.11.12`\n- Package Manager: `npm@10.9.2`\n- Builder: `-`\n- User Config: `runtimeConfig`, `ssr`, `alias`, `compatibilityDate`, `devtools`, `css`, `vite`, `modules`\n- Runtime Modules: `@nuxt/test-utils/module@3.19.1`\n- Build Modules: `-`\n\n### Reproduction\n\n```json\n//package.json\n{\n \"name\": \"dummy-repo\",\n \"private\": true,\n \"type\": \"module\",\n \"scripts\": {\n \"test\": \"vitest\",\n },\n \"dependencies\": {\n \"nuxt\": \"^3.17.5\",\n \"vue\": \"^3.5.16\",\n },\n \"devDependencies\": {\n \"@nuxt/test-utils\": \"^3.19.1\",\n \"happy-dom\": \"^17.6.3\",\n \"vitest\": \"^3.2.3\"\n }\n}\n```\n\n```ts\n//nuxt.config.ts\nexport default defineNuxtConfig({\n ...\n modules: [\n '@nuxt/test-utils/module'\n ]\n})\n```\n\n```ts\n//vitest.config.ts\nimport { configDefaults } from 'vitest/config';\nimport { defineVitestConfig } from '@nuxt/test-utils/config';\nimport vue from '@vitejs/plugin-vue';\n\nexport default defineVitestConfig({\n test: {\n ...\n projects: [\n ...\n {\n plugins: [vue()],\n test: {\n environmentOptions: {\n // nuxt: { // purposely commented out\n // url: 'http://localhost:3000',\n // other properties...\n // }\n },\n include: [\n 'tests/app.test.ts', //With dummy app.vue it can be empty template\n ],\n name: 'Nuxt Environment',\n globals: true,\n environment: 'nuxt',\n },\n },\n ],\n },\n})\n``\n\n### Describe the bug\n\n```bash\n# run\nnpm run test\n```\nResults in:\n\n```bash\nTypeError: Cannot read properties of undefined (reading 'url') # checking this\n ❯ Object.setup node_modules/@nuxt/test-utils/dist/vitest-environment.mjs:177:31\n ❯ withEnv node_modules/vitest/dist/chunks/runBaseTests.Dd85QTll.js:82:32\n ❯ run node_modules/vitest/dist/chunks/runBaseTests.Dd85QTll.js:109:8\n ❯ runBaseTests node_modules/vitest/dist/chunks/base.Cg0miDlQ.js:32:2\n ❯ ForksBaseWorker.executeTests node_modules/vitest/dist/workers/forks.js:29:4\n ❯ execute node_modules/vitest/dist/worker.js:108:3\n ❯ onMessage node_modules/tinypool/dist/entry/process.js:39:18\n```\n\nIn line `Object.setup node_modules/@nuxt/test-utils/dist/vitest-environment.mjs:177:31` seeing this `environmentOptions?.nuxt.url ?? \"http://localhost:3000\",`\n\nI believe `nuxt` could use the help of question mark, so that `http://localhost:3000` can be reached.\n\nSo change the line to `environmentOptions?.nuxt?.url ?? \"http://localhost:3000\",`\n\n### Note on Documention\n\nI see one of the guys constantly saying \"Just follow the documentation\"\nThe documentation specifically says, it can be added [OPTIONALLY](https://nuxt.com/docs/getting-started/testing#using-a-nuxt-runtime-environment)\n```\nexport default defineVitestConfig({\n test: {\n environment: 'nuxt',\n // you can optionally set Nuxt-specific environment options\n // environmentOptions: {\n // nuxt: {\n // rootDir: fileURLToPath(new URL('./playground', import.meta.url)),\n // domEnvironment: 'happy-dom', // 'happy-dom' (default) or 'jsdom'\n // overrides: {\n // // other Nuxt config you want to pass\n // }\n // }\n // }\n }\n})\n```\nThe source code currently makes us doing that mandatorily.\n\nSame thing with the next line.\n\n`environmentOptions?.nuxtRuntimeConfig.app?.baseURL || \"/\"`\n\n```bash\nTypeError: Cannot read properties of undefined (reading 'app')\n```\n\nLet me know, what I can add as a work around, because the documentation doesn't even have anything on the optional side.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3032],{"name":3019,"color":3020},1326,"Cannot read url of undefined","2025-06-16T10:23:27Z","https://github.com/nuxt/test-utils/issues/1326",0.64969486,{"description":3039,"labels":3040,"number":3043,"owner":3022,"repository":3022,"state":3044,"title":3045,"updated_at":3046,"url":3047,"score":3048},"### Environment\n\nC:\\Users\\jsedano\\repos>npx nuxi info\nNeed to install the following packages:\nnuxi@3.23.0\nOk to proceed? (y)\n\nWorking directory: C:/Users/jsedano/repos nuxi 12:44:26\nNuxt project info: nuxi 12:44:26\n\n------------------------------\n- Operating System: Windows_NT\n- Node Version: v22.12.0\n- Nuxt Version: -\n- CLI Version: 3.23.0\n- Nitro Version: -\n- Package Manager: npm@10.9.0\n- Builder: -\n- User Config: -\n- Runtime Modules: -\n- Build Modules: -\n------------------------------\n\n👉 Report an issue: https://github.com/nuxt/nuxt/issues/new?template=bug-report.yml\n👉 Suggest an improvement: https://github.com/nuxt/nuxt/discussions/new\n👉 Read documentation: https://nuxt.com\n\n\nC:\\Users\\jsedano\\repos>\n\n### Reproduction\n\nI have created a repository in https://gitlab.com/javier-sedano/poc-coverage/-/tree/master with the minimal reproduction, and several branches for the diagnose I have done (see below).\n\n\n### Describe the bug\n\nThe coverage of the files in pages/ is not measured (other folders do not seem to suffer the same problem).\n\n### Additional context\n\nI have tried to do the minimal reproduction by doing the following:\n\nCreating the project with instructions from https://nuxt.new/ (the instructions from https://nuxt.com/docs/getting-started/installation#new-project fail (see https://github.com/nuxt/nuxt/issues/31383 )): `npm create nuxt@latest` . Choosing poc-coverage and yarn. Choosing @nuxt/test-utils .\n\nInstalled testing dependencies: `yarn add --dev @nuxt/test-utils vitest @vue/test-utils happy-dom` . Following instructions in https://nuxt.com/docs/getting-started/testing#setup except that nuxt.config.ts already contains the @nuxt/test-utils module (so skipped). Excluded nuxt.config.ts from coverage. Install @vitest/coverage-v8 .\n\nI created a simple \"Hello world\" [page](https://gitlab.com/javier-sedano/poc-coverage/-/blob/master/pages/index.vue):\n\n```\n\u003Ctemplate>\n \u003Cdiv v-on:click=\"bye\">\n {{ hello }}\n \u003C/div>\n\u003C/template>\n\n\u003Cscript lang=\"ts\" setup>\nimport { ref } from \"vue\";\n\nconsole.log(\"SETUP\");\n\nconst hello = ref\u003Cstring>(\"Hello\");\n\nfunction bye(): void {\n console.log(\"bye\")\n hello.value = \"bye\";\n}\n\u003C/script>\n\n```\n\nAnd a very [simple test](https://gitlab.com/javier-sedano/poc-coverage/-/blob/master/tests/index.nuxt.spec.ts) intentionally not testing the bye() function:\n\n```typescript\nimport { mountSuspended } from \"@nuxt/test-utils/runtime\"\nimport { describe, it, expect } from \"vitest\"\nimport Index from \"~/pages/index.vue\"\n\ndescribe(\"Index\", () => {\n it(\"Should render\", async () => {\n const wrapper = await mountSuspended(Index)\n expect(wrapper.element).toMatchSnapshot(\"Initial\");\n })\n})\n```\n\nWhen I run the [tests](https://gitlab.com/javier-sedano/poc-coverage/-/blob/master/package.json#L8), the coverage of the `pages/index.vue` file is wrong (I expect lines 14-17 (the bye() function) to be uncovered, and the rest of lines covered):\n\n```\n % Coverage report from v8\n--------------------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n--------------------|---------|----------|---------|---------|-------------------\nAll files | 100 | 100 | 100 | 100 | \n poc-coverage | 100 | 100 | 100 | 100 | \n app.vue | 100 | 100 | 100 | 100 | \n poc-coverage/pages | 0 | 0 | 0 | 0 | \n index.vue | 0 | 0 | 0 | 0 | \n--------------------|---------|----------|---------|---------|-------------------\n\n```\n\nNotice how it does not say \"Uncovered Lines 1-19\", so it is not that it is not recognizing the coverage, it rather looks like if it thinks that index.vue does not have any line to be measured.\n\nI have done some additional tests and a workaround.\n\nIn the branch [renamed_pages_dir](https://gitlab.com/javier-sedano/poc-coverage/-/tree/renamed_pages_dir?ref_type=heads), I change the name of he folder `pages` to `pagesX` and suddenly the coverage is correctly measured:\n\n```\n % Coverage report from v8\n---------------------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n---------------------|---------|----------|---------|---------|-------------------\nAll files | 63.63 | 100 | 0 | 63.63 | \n poc-coverage | 100 | 100 | 100 | 100 | \n app.vue | 100 | 100 | 100 | 100 | \n poc-coverage/pagesX | 60 | 100 | 0 | 60 | \n index.vue | 60 | 100 | 0 | 60 | 14-17 \n---------------------|---------|----------|---------|---------|-------------------\n```\n\nBut obviously the application no longer works because the `pages/` directory does not exist.\n\nIn the branch [renamed_pages_dir_and_configured](https://gitlab.com/javier-sedano/poc-coverage/-/tree/renamed_pages_dir_and_configured?ref_type=heads), I configure [dir.pages](https://gitlab.com/javier-sedano/poc-coverage/-/blob/renamed_pages_dir_and_configured/nuxt.config.ts?ref_type=heads#L6):\n\n```\n// https://nuxt.com/docs/api/configuration/nuxt-config\nexport default defineNuxtConfig({\n compatibilityDate: '2024-11-01',\n devtools: { enabled: true },\n modules: ['@nuxt/test-utils'],\n dir: {\n pages: \"pagesX\",\n },\n})\n```\n\n... and the application works again... but the coverage of the tests is wrong again:\n\n```\n % Coverage report from v8\n---------------------|---------|----------|---------|---------|-------------------\nFile | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n---------------------|---------|----------|---------|---------|-------------------\nAll files | 100 | 100 | 100 | 100 | \n poc-coverage | 100 | 100 | 100 | 100 | \n app.vue | 100 | 100 | 100 | 100 | \n poc-coverage/pagesX | 0 | 0 | 0 | 0 | \n index.vue | 0 | 0 | 0 | 0 | \n---------------------|---------|----------|---------|---------|-------------------\n```\n\nApparently Nuxt is doing something with the `pages/` folder that breaks the coverage masure.\n\nI have done a workaround in the branch [workaround](https://gitlab.com/javier-sedano/poc-coverage/-/tree/workaround?ref_type=heads):\n\n```\n// https://nuxt.com/docs/api/configuration/nuxt-config\nexport default defineNuxtConfig({\n compatibilityDate: '2024-11-01',\n devtools: { enabled: true },\n modules: ['@nuxt/test-utils'],\n dir:\n process.env.NODE_ENV === \"test\"\n ? {\n pages: \"_pages\",\n }\n : undefined,\n})\n```\n\nThis way, only for the tests, the `pages/` directory is not the directory-of-the-pages, and coverage is correctly measured, and at the same time this is only for the tests, so the application works. I am not keen on this workaround because it might have other consequences.\n\nQuestions:\n\n* Is this really a bug? Or am I missing to configure anything else?\n* Can anybody suggest a better workaround or solution?\n\n\n### Logs\n\n```shell-script\n\n```",[3041],{"name":3019,"color":3042},"E99695",31384,"closed","Wrong coverage of .vue files in pages/ with the minimal project","2025-03-17T04:43:10Z","https://github.com/nuxt/nuxt/issues/31384",0.61514497,{"description":3050,"labels":3051,"number":3059,"owner":3022,"repository":3022,"state":3044,"title":3060,"updated_at":3061,"url":3062,"score":3063},"### Environment\n\n```\r\n- Operating System: `Darwin`\r\n- Node Version: `v16.16.0`\r\n- Nuxt Version: `3.0.0-rc.11`\r\n- Nitro Version: `0.5.4`\r\n- Package Manager: `yarn@1.22.11`\r\n- Builder: `vite`\r\n```\r\n\r\nThough I have also tested with rc 10, 8, 5, & 4\n\n### Reproduction\n\nThis is fairly short so ill avoid reproduction unless theres a strong need\r\n\r\nFrom a fresh Nuxt 3 Project:\r\n\r\n```json\r\n// package.json\r\n\r\n{\r\n \"scripts\": {\r\n ...\r\n \"build\": \"nuxt build\",\r\n \"test\": \"vitest run\"\r\n },\r\n \"devDependencies\": {\r\n \"nuxt\": \"3.0.0-rc.11\"\r\n },\r\n \"dependencies\": {\r\n \"@nuxt/test-utils\": \"3.0.0-rc.11\",\r\n \"vitest\": \"^0.23.4\"\r\n }\r\n}\r\n```\r\n\r\n```ts\r\n// vite.config.ts\r\n\r\nimport { defineConfig } from \"vitest/config\";\r\n\r\nexport default defineConfig({\r\n test: {\r\n globals: true,\r\n },\r\n});\r\n```\r\n\r\n```html\r\n// pages/index.vue\r\n\r\n\u003Ctemplate>\r\n \u003Ch1>Hello World!\u003C/h1>\r\n\u003C/template>\r\n```\r\n\r\n```ts\r\n// pages/index.spec.ts\r\n\r\nimport { describe, test, expect } from 'vitest'\r\nimport { setup, $fetch } from '@nuxt/test-utils'\r\n\r\ndescribe('My test', async () => {\r\n await setup({\r\n runner: 'vitest',\r\n })\r\n\r\n test('my test', () => {\r\n const html = $fetch('/')\r\n\r\n expect(html).toContain('Hello World!')\r\n })\r\n})\r\n```\n\n### Describe the bug\n\nDuring the `beforeAll` section of the `setup` in my test it crashes with this result:\r\n\r\n```\r\nError: [vite]: Rollup failed to resolve import \"jest\" from \"node_modules/@nuxt/test-utils/dist/index.mjs\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\n```\r\n\r\nThis is strange since the runner is clearly `vitest`, so it shouldnt be trying to import jest.\r\n\r\nTook a brief look at the `index.mjs` and my `hooks.ctx.options.runner` is properly recieving `vitest`.\r\n\r\nThe error ends with:\r\n\r\n```\r\n Segmentfault Error Detected \r\n FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.\r\n Refer to https://github.com/nodejs/node/issues/42407\r\n```\n\n### Additional context\n\nI havent been able to find a solid working example to base my own code. I was hoping this issue was just the RC version that I was using, but so far I havent had any luck with changing it. \r\n\r\nI tried cloning the `nuxt-ionic` repository as I saw it was on a later RC version and using vitest, however even with that I ran into issues. Is there a good working example I can be pointed in the direction of?\n\n### Logs\n\n```shell\n$ vitest run\r\n\r\n RUN v0.23.4 /Users/*********************/test-utils\r\n\r\n ❯ pages/index.spec.ts (1)\r\n 1: 0x103ab6ef5 node::Abort() (.cold.1) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n ❯ pages/index.spec.ts (1) 4104ms\r\n ❯ My test (1) 4103ms\r\n ⠙ [ beforeAll ]\r\n · my test\r\n\r\n 2: 0x1027aa869 node::Abort() [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 3: 0x1027aa9df node::OnFatalError(char const*, char const*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n\r\n FAIL pages/index.spec.ts > My test\r\n 4: 0x10292ed00 v8::V8::ToLocalEmpty() [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\nError: [vite]: Rollup failed to resolve import \"jest\" from \"node_modules/@nuxt/test-utils/dist/index.mjs\".\r\nThis is most likely unintended because it can break your application at runtime.\r\nIf you do want to externalize this module explicitly add it to\r\n`build.rollupOptions.external`\r\n ❯ onRollupWarning node_modules/vite/dist/node/chunks/dep-6b3a5aff.js:45908:19\r\n 5: 0x1027a596f node::fs::FSReqPromise\u003Cnode::AliasedBufferBase\u003Cdouble, v8::Float64Array, void> >::Resolve(v8::Local\u003Cv8::Value>) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n ❯ onwarn node_modules/vite/dist/node/chunks/dep-6b3a5aff.js:45706:13\r\n ❯ Object.onwarn node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:23225:13\r\n ❯ ModuleLoader.handleResolveId node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22352:26\r\n ❯ ModuleLoader.resolveDynamicImport node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22404:120\r\n ❯ async file:/Users/*********************/test-utils/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22299:32\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n 6: 0x1027afa40 node::fs::AfterStat(uv_fs_s*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 7: 0x103176598 uv__work_done [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 8: 0x10317b75b uv__async_io [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n 9: 0x10318f54b uv__io_poll [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\nSerialized Error: Object {\r\n \"watchFiles\": [Array],\r\n}\r\n10: 0x10317bce1 uv_run [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯\r\n\r\n11: 0x1026dbf9f node::SpinEventLoop(node::Environment*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\nTest Files 1 failed (1)\r\n Tests (1)\r\n12: 0x102852cae node::worker::Worker::Run() [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n13: 0x1028566a2 node::worker::Worker::StartThread(v8::FunctionCallbackInfo\u003Cv8::Value> const&)::$_3::__invoke(void*) [/Users/*********************/.nvm/versions/node/v16.16.0/bin/node]\r\n14: 0x7ff8042ef4e1 _pthread_start [/usr/lib/system/libsystem_pthread.dylib]\r\n15: 0x7ff8042eaf6b thread_start [/usr/lib/system/libsystem_pthread.dylib]\r\n\r\n Segmentfault Error Detected \r\n FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.\r\n Refer to https://github.com/nodejs/node/issues/42407\r\n\r\nIt seems to be an upstream bug of Node.js. To improve the test stability,\r\nyou could pass --segfault-retry=3 or set env VITEST_SEGFAULT_RETRY=3 to\r\nhave Vitest auto retries on flaky segfaults.\r\n\r\nerror Command failed with exit code 1.\n```\n",[3052,3055,3056],{"name":3053,"color":3054},"3.x","29bc7f",{"name":3019,"color":3042},{"name":3057,"color":3058},"needs reproduction","FBCA04",15073,"Unable to get a running env with `nuxt/test-utils`","2023-01-19T17:44:36Z","https://github.com/nuxt/nuxt/issues/15073",0.635282,{"description":3065,"labels":3066,"number":3069,"owner":3022,"repository":3022,"state":3044,"title":3070,"updated_at":3071,"url":3072,"score":3073},"### 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_",[3067,3068],{"name":3053,"color":3054},{"name":3019,"color":3042},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.6356199,{"description":3075,"labels":3076,"number":3080,"owner":3022,"repository":3023,"state":3044,"title":3081,"updated_at":3082,"url":3083,"score":3084},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.12.0`\n- Nuxt Version: `3.17.3`\n- CLI Version: `3.25.1`\n- Nitro Version: `2.11.12`\n- Package Manager: `bun@1.2.14`\n- Builder: `-`\n- User Config: `modules`, `typescript`, `alias`, `compatibilityDate`, `css`, `devtools`, `experimental`, `future`, `rootDir`, `vite`, `hanko`, `i18n`\n- Runtime Modules: `~~/modules/startup-check`, `@nuxt/fonts@0.11.4`, `@nuxt/icon@1.13.0`, `@nuxt/image@1.10.0`, `@nuxt/test-utils@3.19.0`, `@nuxt/test-utils/module@3.19.0`, `@nuxt/ui@3.1.2`, `@nuxtjs/i18n@9.5.4`, `@nuxtjs/hanko@1.0.0`\n- Build Modules: `-`\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-d5xpujkj?file=test%2Fbug.test.ts\n\n### Describe the bug\n\nI got some trouble when I updated from 3.18 to 3.19\n\nAfter the update only `.nuxt.test.ts` tests are run by vitest.\n\nTo restore the previous behaviour (also running tests unrelated to nuxt), I now need to set environment \"nuxt\", which feels really unintiutive.\n```TypeScript\nexport default defineVitestConfig({\n test: {\n environment: \"nuxt\",\n },\n})\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3077],{"name":3078,"color":3079},"good first issue","7057ff",1296,"Update from 3.18 to 3.19 changed default configuration, causing tests without .nuxt. to not be included","2025-06-20T07:54:57Z","https://github.com/nuxt/test-utils/issues/1296",0.6359418,{"description":3086,"labels":3087,"number":3088,"owner":3022,"repository":3089,"state":3044,"title":3090,"updated_at":3091,"url":3092,"score":3093},"Nuxt 3.16.1\n\n```ts\n[8:47:30 PM] ERROR Pre-transform error: fetch failed\n Plugin: nuxt:fonts:font-family-injection\n File: /country/app/assets/css/tailwind.css\n```\n\n\n```ts\n fonts: {\n families: [\n { name: 'Inter', provider: 'google' },\n { name: 'JetBrains Mono', provider: 'google' },\n { name: 'IM Fell English', provider: 'google' },\n { name: 'Pirata One', provider: 'google' },\n {\n name: 'Fira Code',\n provider: 'google',\n weights: [400, 500],\n },\n ],\n },\n```",[],574,"fonts","Pre-transform error: fetch failed","2025-04-21T09:34:26Z","https://github.com/nuxt/fonts/issues/574",0.6535814,{"description":3095,"labels":3096,"number":3088,"owner":3022,"repository":3023,"state":3044,"title":3100,"updated_at":3101,"url":3102,"score":3093},"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`",[3097],{"name":3098,"color":3099},"vitest-environment","b60205","allow configuring nuxt rootDir and overrides does not appear to work","2023-12-02T00:27:09Z","https://github.com/nuxt/test-utils/issues/574",{"description":3104,"labels":3105,"number":3108,"owner":3022,"repository":3022,"state":3044,"title":3109,"updated_at":3110,"url":3111,"score":3112},"### 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```",[3106,3107],{"name":3019,"color":3042},{"name":3057,"color":3058},31203,"Static pages not working on nuxt 3 project","2025-03-05T19:47:06Z","https://github.com/nuxt/nuxt/issues/31203",0.65712875,{"description":3114,"labels":3115,"number":3118,"owner":3022,"repository":3022,"state":3044,"title":3119,"updated_at":3120,"url":3121,"score":3122},"### Environment\n\nNuxt project info: 15:05:56\r\n\r\n------------------------------\r\n- Operating System: Windows_NT\r\n- Node Version: v21.3.0\r\n- Nuxt Version: 3.8.2\r\n- CLI Version: 3.10.0\r\n- Nitro Version: 2.8.1\r\n- Package Manager: npm@10.2.4\r\n- Builder: -\r\n- User Config: devtools, css, modules, postcss, pinia\r\n- Runtime Modules: nuxt-icon@0.6.7, @pinia/nuxt@0.5.1, @vueuse/nuxt@10.7.0\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/nuxt-starter-hutksq?file=package.json\n\n### Describe the bug\n\nWhen I run:\r\n```bash\r\nnpx vitest run --coverage\r\n```\r\n\r\nI have the message that ask me if I want to install v8 (✔ Do you want to install @vitest/coverage-v8?)\r\nAnd after that I receive the error :\r\n```\r\nnpm ERR! code ERESOLVE\r\nnpm ERR! ERESOLVE unable to resolve dependency tree\r\nnpm ERR! \r\nnpm ERR! While resolving: undefined@undefined\r\nnpm ERR! Found: vitest@0.33.0\r\nnpm ERR! node_modules/vitest\r\nnpm ERR! dev vitest@\"^0.33.0\" from the root project\r\nnpm ERR! \r\nnpm ERR! Could not resolve dependency:\r\nnpm ERR! peer vitest@\"^1.0.0\" from @vitest/coverage-v8@1.0.4\r\nnpm ERR! node_modules/@vitest/coverage-v8\r\nnpm ERR! dev @vitest/coverage-v8@\"*\" from the root project\r\nnpm ERR! \r\nnpm ERR! Fix the upstream dependency conflict, or retry\r\nnpm ERR! this command with --force or --legacy-peer-deps\r\nnpm ERR! to accept an incorrect (and potentially broken) dependency resolution.\r\nnpm ERR! \r\nnpm ERR! \r\nnpm ERR! For a full report see:\r\nnpm ERR! /home/.npm/_logs/2023-12-12T14_11_48_769Z-eresolve-report.txt\r\n\r\nnpm ERR! A complete log of this run can be found in:\r\nnpm ERR! /home/.npm/_logs/2023-12-12T14_11_48_769Z-debug-0.log\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\nError: Command failed with exit code 1: npm install -D @vitest/coverage-v8\r\n at makeError$1 (/home/projects/nuxt-starter-hutksq/node_modules/vitest/dist/chunk-install-pkg.23da664c.js:993:11)\r\n at handlePromise (/home/projects/nuxt-starter-hutksq/node_modules/vitest/dist/chunk-install-pkg.23da664c.js:1529:35) {\r\n shortMessage: 'Command failed with exit code 1: npm install -D @vitest/coverage-v8',\r\n command: 'npm install -D @vitest/coverage-v8',\r\n escapedCommand: 'npm install -D \"@vitest/coverage-v8\"',\r\n exitCode: 1,\r\n signal: undefined,\r\n signalDescription: undefined,\r\n stdout: undefined,\r\n stderr: undefined,\r\n failed: true,\r\n timedOut: false,\r\n isCanceled: false,\r\n killed: false\r\n}\r\n```\r\n\r\nWhy nuxt test utils do not use vitest >= 1.0.0\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3116,3117],{"name":3053,"color":3054},{"name":3019,"color":3042},24710,"Cannot use v8 or istanbul for coverage with @nuxt/test-utils","2023-12-12T15:52:31Z","https://github.com/nuxt/nuxt/issues/24710",0.65871316,["Reactive",3124],{},["Set"],["ShallowReactive",3127],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fgW2YlzVAZ7MdFhpeZC_2UskmCA8y-GRCL4DuQrbJ07A":-1},"/nuxt/test-utils/1352"]