\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).",[3032],{"name":3019,"color":3020},1322,"Support Vitest `projects` option for Browser Mode","2025-06-18T13:51:03Z","https://github.com/nuxt/test-utils/issues/1322",0.67148703,{"description":3039,"labels":3040,"number":3043,"owner":3022,"repository":3022,"state":3024,"title":3044,"updated_at":3045,"url":3046,"score":3047},"### Environment\n\n- Operating System: Darwin\n- Node Version: v22.14.0\n- Nuxt Version: 3.16.1\n- CLI Version: 3.23.1\n- Nitro Version: 2.11.7\n- Package Manager: pnpm@10.6.5\n- Builder: -\n- User Config: compatibilityDate, components\n- Runtime Modules: -\n- Build Modules: -\n\n## Additional\n\n- Mac Sequoia 15.3.2 (24D81)\n- \"vue-tsc\": \"2.2.8\"\n- VSCode 1.98.2 + Vue - Official\" extension (`vue.volar@2.2.8`)\n\n### Reproduction\n\nThis minimal reproduction [GitHub](https://github.com/mseeley/nuxt-vue-tsc) creates `nuxt.config.ts` and `.npmrc` on-demand, using `fixtures/*`, to satisfy different test conditions. Please see [the `README.md`](https://github.com/mseeley/nuxt-vue-tsc/blob/main/README.md).\n\nThis repo is not a mono-repo. While isolating the bug I first reproduced it in a version of this repository with PNPM workspaces. I have since been able to reduce the repro to a shallow single-app repo.\n\n## Tests\n\nIn both cases below you will see implicit-any TS errors [like this one from my local machine](https://github.com/mseeley/nuxt-vue-tsc/blob/main/screenshots/SCR-20250321-oluy.png).\n\n### Stackblitz\n\n- [Stackblitz](https://stackblitz.com/~/github.com/mseeley/nuxt-vue-tsc?file=README.md)\n- Run `./repro.sh`\n\n### Local\n\n- Checkout [the repo](https://github.com/mseeley/nuxt-vue-tsc)\n- Examine `Makefile`, it's used to run bash commands\n- Run `make pnpm-shamefully-hoist-false-components-empty-dirs`\n\n### Describe the bug\n\nThis bug reproduces when:\n\n- Node.js modules are installed using PNPM _without_ `shamefully-hoist=true`\n- Nuxt auto-import of files in `components/` is disabled.\n\nWhen this happens, Vue component generics of files in `components/`, are handled with an implicit any type. This reproduces on the CLI using `nuxi typecheck` and `vue-tsc --noEmit`. It also reproduces in VSCode.\n\n| Module Manager | `shamefully-hoist` | `components` | Pass | Repro |\n| -------------- | ------------------ | -------------- | ---- | -------------------------------------------------------- |\n| `npm@10.2.4` | n/a | `{ dirs: [] }` | ✅ | `make npm-components-empty-dirs` |\n| `pnpm@10.6.5` | `true` | `{ dirs: [] }` | ✅ | `make pnpm-shamefully-hoist-true-components-empty-dirs` |\n| `pnpm@10.6.5` | `false` | `{ dirs: [] }` | ❌ | `make pnpm-shamefully-hoist-false-components-empty-dirs` |\n| `npm@10.2.4` | n/a | `undefined` | ✅ | `make npm-components-undefined` |\n| `pnpm@10.6.5` | `true` | `undefined` | ✅ | `make pnpm-shamefully-hoist-true-components-undefined` |\n| `pnpm@10.6.5` | `false` | `undefined` | ✅ | `make pnpm-shamefully-hoist-false-components-undefined` |\n\n⭐️ `pnpm` tests show identical behavior on `v8.15.1`.\n\n\n### Additional context\n\nInitial workarounds are clear:\n\n- Enable `shamefully-hoist=true`\n- Or, enable auto-imports of `components/**/*.vue`\n\nBut, perhaps there's a surgical hoist? Or, a vue-tsc/Nuxt update?\n\n### Logs\n\n```shell-script\nFrom Stackblitz:\n\n\n❯ ./repro.sh\nLockfile is up to date, resolution step is skipped\nPackages: +579\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\nProgress: resolved 579, reused 579, downloaded 0, added 579, done\n\ndependencies:\n+ typed-assert 1.0.9\n\ndevDependencies:\n+ nuxt 3.16.1\n+ vue-tsc 2.2.8\n\n> nuxt-app@ postinstall /home/mseeley/nuxt-vue-tsc\n> nuxt prepare\n\n✔ Types generated in .nuxt nuxi 4:46:35 PM\n\nDone in 4.3s\n\n> _tc\n> nuxi typecheck\n\napp.vue:13:40 - error TS7006: Parameter 'item' implicitly has an 'any' type.\n\n13 \u003CAll :items=\"scientists\" :key-of=\"(item) => item.id\">\n ~~~~\n\n\nFound 1 error in app.vue:13\n\n\n ERROR Process exited with non-zero status (2) 4:46:40 PM\n\n at new x (node_modules/.pnpm/tinyexec@0.3.2/node_modules/tinyexec/dist/main.js:440:5)\n at R._waitForOutput (node_modules/.pnpm/tinyexec@0.3.2/node_modules/tinyexec/dist/main.js:548:13)\n at async Object.run (node_modules/.pnpm/@nuxt+cli@3.23.1/node_modules/@nuxt/cli/dist/chunks/typecheck.mjs:84:9)\n at async runCommand (node_modules/.pnpm/citty@0.1.6/node_modules/citty/dist/index.mjs:337:16)\n at async runCommand (node_modules/.pnpm/citty@0.1.6/node_modules/citty/dist/index.mjs:328:11)\n at async Module.runMain (node_modules/.pnpm/citty@0.1.6/node_modules/citty/dist/index.mjs:466:7) \n\n\n\n ERROR Process exited with non-zero status (2) 4:46:40 PM\n\n\n> nuxt-app@ _tc /home/mseeley/nuxt-vue-tsc\n> nuxi typecheck\n\napp.vue:13:40 - error TS7006: Parameter 'item' implicitly has an 'any' type.\n\n13 \u003CAll :items=\"scientists\" :key-of=\"(item) => item.id\">\n ~~~~\n\n\nFound 1 error in app.vue:13\n\n\n ERROR Process exited with non-zero status (2) 4:46:45 PM\n\n at new x (node_modules/.pnpm/tinyexec@0.3.2/node_modules/tinyexec/dist/main.js:440:5)\n at R._waitForOutput (node_modules/.pnpm/tinyexec@0.3.2/node_modules/tinyexec/dist/main.js:548:13)\n at async Object.run (node_modules/.pnpm/@nuxt+cli@3.23.1/node_modules/@nuxt/cli/dist/chunks/typecheck.mjs:59:7)\n at async runCommand (node_modules/.pnpm/citty@0.1.6/node_modules/citty/dist/index.mjs:337:16)\n at async runCommand (node_modules/.pnpm/citty@0.1.6/node_modules/citty/dist/index.mjs:328:11)\n at async Module.runMain (node_modules/.pnpm/citty@0.1.6/node_modules/citty/dist/index.mjs:466:7) \n\n\n\n ERROR Process exited with non-zero status (2) 4:46:45 PM\n\n ELIFECYCLE Command failed with exit code 1.\n```",[3041],{"name":3019,"color":3042},"E99695",31499,"Disabling `components` auto-import breaks Vue component generics in PNPM without `shamefully-hoisted`","2025-03-22T09:33:52Z","https://github.com/nuxt/nuxt/issues/31499",0.6779315,{"labels":3049,"number":3060,"owner":3022,"repository":3022,"state":3061,"title":3062,"updated_at":3063,"url":3064,"score":3065},[3050,3053,3054,3057],{"name":3051,"color":3052},"3.x","29bc7f",{"name":3019,"color":3042},{"name":3055,"color":3056},"needs reproduction","FBCA04",{"name":3058,"color":3059},"layers","006B75",25230,"closed","Wrong tsconfig when operating in monorepo","2024-05-24T14:00:23Z","https://github.com/nuxt/nuxt/issues/25230",0.65189075,{"description":3067,"labels":3068,"number":3071,"owner":3022,"repository":3022,"state":3061,"title":3072,"updated_at":3073,"url":3074,"score":3075},"### Environment\r\n\r\n## Monorepo root\r\n```\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v18.15.0`\r\n- Nuxt Version: `3.3.2`\r\n- Nitro Version: `2.3.2`\r\n- Package Manager: `pnpm@8.1.0`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n```\r\n\r\n## App and Layer\r\n```\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v18.15.0`\r\n- Nuxt Version: `3.3.2`\r\n- Nitro Version: `2.3.2`\r\n- Package Manager: `pnpm@8.1.0`\r\n- Builder: `vite`\r\n- User Config: `extends`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n```\r\n\r\n### Reproduction\r\n\r\n1. clone this example https://github.com/kleinpetr/nuxt-layers\r\n2. run `pnpm i` in the root (it runs `nuxt prepare` at the end)\r\n3. open `layers/my-layer/nuxt.config.ts` (you should see the error as below)\r\n\r\n\r\n\r\n### Describe the bug\r\n\r\nI am playing with Nuxt Layers and facing some troubles, especially with auto imports inside layers \r\n\r\nwhen I run `pnpm build` or even `nuxi prepare` the error message disappears for a while but then returns back as you can see on the gif below\r\n\r\n\r\n\r\nI am using Volar TS Exntension with Takeover mode (I also tried enable builtin TS Language Extension and Disable Volar, but the result is still the same) \r\n\r\nDo you have any suggestion what should be the problem? (in the `/app` folder everything works fine, but inside `/layers` it is not)\r\n\r\nThanks for help :pray: \r\n\r\n### Additional context\r\nDiscussion: https://github.com/nuxt/nuxt/discussions/19963\r\nOS: Linux Fedora 37\r\nVSCode: version 1.76.2\r\n\r\n### Logs\r\n\r\n_No response_",[3069,3070],{"name":3051,"color":3052},{"name":3019,"color":3042},20155,"Nuxt Layers - VSCode auto-imports","2024-02-22T08:27:01Z","https://github.com/nuxt/nuxt/issues/20155",0.65499216,{"description":3077,"labels":3078,"number":3081,"owner":3022,"repository":3022,"state":3061,"title":3082,"updated_at":3083,"url":3084,"score":3085},"### Environment\n\n- Operating System: Windows_NT\r\n- Node Version: v18.16.1\r\n- Nuxt Version: 3.6.5\r\n- Nitro Version: 2.5.2\r\n- Package Manager: npm@9.8.1\r\n- Builder: vite\r\n- User Config: -\r\n- Runtime Modules: -\r\n- Build Modules: -\n\n### Reproduction\n\nthe reproduction is [here](https://stackblitz.com/edit/github-h5v6xs?file=src%2Fmodule.ts)\r\nplease run `npm dev:prepare` then `npm run prepack`\n\n### Describe the bug\n\nI have followed the instruction to expose module options using defu package as it is advised [here](https://nuxt.com/docs/guide/going-further/modules#exposing-options-to-runtime).\r\nThe module works as intended in development, but in build (after running npm run prepack): I get the following warning :\r\n inline implicit external defu .\r\n\r\n\n\n### Additional context\n\nwhen I ran` npx nuxi init -t module my-module` then npm install I got a peerdependency conflic\r\n\r\n```\r\nnpm ERR! While resolving: @nuxt/test-utils@3.6.5\r\nnpm ERR! Found: vitest@0.34.2\r\nnpm ERR! node_modules/vitest\r\nnpm ERR! dev vitest@\"^0.34.1\" from the root project\r\nnpm ERR! \r\nnpm ERR! Could not resolve dependency:\r\nnpm ERR! peerOptional vitest@\"^0.30.0 || ^0.31.0 || ^0.32.0 || ^0.33.0\" from @nuxt/test-utils@3.6.5\r\nnpm ERR! node_modules/@nuxt/test-utils\r\nnpm ERR! dev @nuxt/test-utils@\"^3.6.5\" from the root project\r\nnpm ERR! \r\nnpm ERR! Conflicting peer dependency: vitest@0.33.0\r\nnpm ERR! node_modules/vitest\r\nnpm ERR! peerOptional vitest@\"^0.30.0 || ^0.31.0 || ^0.32.0 || ^0.33.0\" from @nuxt/test-utils@3.6.5\r\nnpm ERR! node_modules/@nuxt/test-utils\r\nnpm ERR! dev @nuxt/test-utils@\"^3.6.5\" 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! See /home/runner/.npm/eresolve-report.txt for a full report.\r\n```\r\n\r\n so I used npm install --force\n\n### Logs\n\n_No response_",[3079,3080],{"name":3051,"color":3052},{"name":3019,"color":3042},22749,"I'm getting a warning when I try to build a module","2024-11-18T09:29:56Z","https://github.com/nuxt/nuxt/issues/22749",0.6603537,{"description":3087,"labels":3088,"number":3091,"owner":3022,"repository":3022,"state":3061,"title":3092,"updated_at":3093,"url":3094,"score":3095},"### Environment\n\n------------------------------\r\n- Operating System: `Darwin`\r\n- Node Version: `v17.9.1`\r\n- Nuxt Version: `3.0.0-rc.12`\r\n- Nitro Version: `0.6.0`\r\n- Package Manager: `npm@8.11.0`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\n\n### Reproduction\n\nhttps://github.com/asmerkin/nuxt3-vitest-issue\r\n\r\nJust install with `npm install` and then use `npm run test` to start vitest.\n\n### Describe the bug\n\nWhen starting tests, it fails, and it seems to be looking for `jest` despite we´re using `vitest` here. \n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell\nFAIL pages/index.spec.js > Example Test\r\n 4: 0x104b13778 node::fs::FSReqAfterScope::~FSReqAfterScope() [/Users/asmerkin/.nvm/versions/node/v17.9.1/bin/node]\r\n 5: 0x104b13c30 node::fs::AfterOpenFileHandle(uv_fs_s*) [/Users/asmerkin/.nvm/versions/node/v17.9.1/bin/node]\r\nError: [vite]: Rollup failed to resolve import \"jest\" from \"node_modules/@nuxt/test-utils-edge/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-4da11a5e.js:45916:19\r\n ❯ onwarn node_modules/vite/dist/node/chunks/dep-4da11a5e.js:45714: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/asmerkin/Workspace/intrepits/test-vitest/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22299:32\r\n 6: 0x1053a9198 uv__work_done [/Users/asmerkin/.nvm/versions/node/v17.9.1/bin/node]\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\r\n 7: 0x1053ac934 uv__async_io [/Users/asmerkin/.nvm/versions/node/v17.9.1/bin/node]\r\n 8: 0x1053be6ac uv__io_poll [/Users/asmerkin/.nvm/versions/node/v17.9.1/bin/node]\r\n 9: 0x1053acdc4 uv_run [/Users/asmerkin/.nvm/versions/node/v17.9.1/bin/node]\r\nSerialized Error: Object {\r\n \"watchFiles\": [Array],\r\n}\n```\n",[3089,3090],{"name":3051,"color":3052},{"name":3019,"color":3042},15315,"Issues running Vitest within Nuxt3","2023-01-30T12:17:13Z","https://github.com/nuxt/nuxt/issues/15315",0.6609384,{"description":3097,"labels":3098,"number":3101,"owner":3022,"repository":3022,"state":3061,"title":3102,"updated_at":3103,"url":3104,"score":3105},"### Environment\r\n\r\nOperating System: `Darwin`\r\nNode Version: `v18.13.0`\r\nNuxt Version: `3.4.2` (But same with 3.5.1)\r\nNitro Version: `2.3.3`\r\nPackage Manager: `pnpm@8.4.0`\r\nBuilder: `vite`\r\nUser Config: `modules`\r\nRuntime Modules: `nuxt-icon@0.4.0`, `@pinia/nuxt@0.4.9`\r\nBuild Modules: -\r\n\r\n### Reproduction\r\n\r\nI have a monorepo with custom modules and some packages\r\n\r\n```\r\nmodules\r\n|-custom-module-name\r\n |-src\r\n |-runtime\r\n |-server\r\n |-api\r\n |-healthcheck.get.ts\r\npackages\r\n|-package-name\r\n```\r\n\r\nAt the packages i've using custom module, which contains `module/custom-module-name/server/api/healthcheck.get.ts` file.\r\n\r\nModule setup file `modules/custom-module-name/src/module.ts`:\r\n\r\n```\r\nimport { addServerHandler, defineNuxtModule } from '@nuxt/kit';\r\n\r\nexport interface ModuleOptions {}\r\n\r\nexport default defineNuxtModule\u003CModuleOptions>({\r\n setup(options, nuxt) {\r\n addServerHandler({\r\n route: '/api/healthcheck',\r\n handler: resolve(runtimeDir, 'server/api/healthcheck.get.ts'),\r\n });\r\n },\r\n});\r\n```\r\n\r\n\r\n`healthcheck.get.ts`:\r\n```\r\nconst startTime = new Date();\r\n\r\nexport default defineEventHandler(() => {\r\n return {\r\n status: 'success',\r\n uptime: process.uptime(),\r\n upSince: startTime,\r\n localTime: new Date(),\r\n env: {\r\n nodeEnv: process.env.NODE_ENV,\r\n pid: process.pid,\r\n },\r\n };\r\n});\r\n```\r\n\r\n### Describe the bug\r\n\r\nIt works fine at dev environment: `http://localhost:3000/api/healthcheck`\r\n\r\nBut when it builds, there is warnings:\r\n\r\n`\"[path]/modules/custom-module-name/dist/runtime/server/api/healthcheck.get.ts\" is imported by \"virtual:#internal/nitro/virtual/server-handlers\", but could not be resolved – treating it as an external dependency.`\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell-script\r\npackages/package-name build: [nuxt] pages:extend: 0.188ms\r\npackages/package-name build: [nuxt] build:manifest: 15.374ms\r\npackages/package-name build: [nuxt] vite:compiled: 0.013ms\r\npackages/package-name build: ✔ Server built in 8490ms\r\npackages/package-name build: [nuxt] schema:beforeWrite: 0.02ms\r\npackages/package-name build: [nuxt] schema:written: 0.035ms\r\npackages/package-name build: [nuxt] nitro:build:before: 0.013ms\r\npackages/package-name build: [nitro] ✔ Generated public .output/public\r\npackages/package-name build: [nuxt] nitro:build:public-assets: 0.008ms\r\npackages/package-name build: [nuxt] prerender:routes: 0.003ms\r\npackages/package-name build: [nitro] prerender:routes: 0.08ms\r\npackages/package-name build: [nitro] rollup:before: 0.011ms\r\npackages/package-name build: [nitro] ℹ Building Nitro Server (preset: node-server)\r\npackages/package-name build: \"/Users/kzotov/projects/project-name/modules/custom-module-name/dist/runtime/server/api/healthcheck.get.ts\" is imported by \"virtual:#internal/nitro/virtual/server-handlers\", but could not be resolved – treating it as an external dependency.\r\n```\r\n",[3099,3100],{"name":3051,"color":3052},{"name":3019,"color":3042},20998,"Can't resolve `module/server/api` from `package` in monorepo","2024-02-18T22:13:03Z","https://github.com/nuxt/nuxt/issues/20998",0.6655864,{"description":3107,"labels":3108,"number":3112,"owner":3022,"repository":3022,"state":3061,"title":3113,"updated_at":3114,"url":3115,"score":3116},"### 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",[3109,3110,3111],{"name":3051,"color":3052},{"name":3019,"color":3042},{"name":3055,"color":3056},15073,"Unable to get a running env with `nuxt/test-utils`","2023-01-19T17:44:36Z","https://github.com/nuxt/nuxt/issues/15073",0.6680078,{"description":3118,"labels":3119,"number":3122,"owner":3022,"repository":3022,"state":3061,"title":3123,"updated_at":3124,"url":3125,"score":3126},"### Environment\n\n```\r\n- Operating System: `Darwin`\r\n- Node Version: `v16.16.0`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `pnpm@7.22.0`\r\n- Builder: `vite`\r\n- User Config: `telemetry`, `test`, `srcDir`, `css`, `ignore`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-ywawgt?file=.nuxt/components.d.ts\n\n### Describe the bug\n\nWhen using components organized within folders, Nuxt is adding non-component files to the global components list. \n\n### Additional context\n\n1. I have tested using the default `ignore` options\r\n2. I have tested by setting explicit `ignore` options\r\n3. I have tested using the `-` prepend method\r\n\r\nNone seem to work for me currently.\r\n\r\n> Also FYI these files being present seem to prevent the `build` command from working on my machine. Could not reproduce this on Stackblitz, but provided my logs below.\n\n### Logs\n\n```shell-script\n➜ pnpm run build\r\n\r\n> @ build /Users/REDACTED\r\n> nuxt build\r\n\r\nNuxi 3.0.0 08:02:07\r\nNuxt 3.0.0 with Nitro 1.0.0 08:02:07\r\n\r\n ERROR 'promises' is not exported by __vite-browser-external, imported by ../chia/node_modules/.pnpm/local-pkg@0.4.3/node_modules/local-pkg/dist/shared.mjs\r\nfile: /Users/REDACTED/node_modules/.pnpm/local-pkg@0.4.3/node_modules/local-pkg/dist/shared.mjs:61:13\r\n59: import process2 from \"process\";\r\n60: import path from \"path\";\r\n61: import fs, { promises as fsPromises } from \"fs\";\r\n ^\r\n62: import { fileURLToPath } from \"url\";\r\n\r\n\r\n ERROR 'promises' is not exported by __vite-browser-external, imported by ../chia/node_modules/.pnpm/local-pkg@0.4.3/node_modules/local-pkg/dist/shared.mjs\r\n\r\n at error (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:1858:30)\r\n at Module.error (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:12429:16)\r\n at Module.traceVariable (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:12788:29)\r\n at ModuleScope.findVariable (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:11440:39)\r\n at FunctionScope.findVariable (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:6372:38)\r\n at ChildScope.findVariable (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:6372:38)\r\n at MemberExpression.bind (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:8601:49)\r\n at ConditionalExpression.bind (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:5269:23)\r\n at VariableDeclarator.bind (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:5269:23)\r\n at VariableDeclaration.bind (node_modules/.pnpm/rollup@2.79.1/node_modules/rollup/dist/es/shared/rollup.js:5265:73)\r\n\r\n ELIFECYCLE Command failed with exit code 1.\n```\n",[3120,3121],{"name":3051,"color":3052},{"name":3019,"color":3042},18439,"nuxt.config's `ignore` and `ignore-prefix` not working","2023-01-23T06:45:32Z","https://github.com/nuxt/nuxt/issues/18439",0.67004067,["Reactive",3128],{},["Set"],["ShallowReactive",3131],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fPdlBGmYqawZGLp3I1ZpI4XrBX8anN8dLY1HSRr38MBg":-1},"/nuxt/test-utils/1300"]