\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).",[3134],{"name":3135,"color":3136},"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.6448637,{"description":3146,"labels":3147,"number":3156,"owner":3138,"repository":3138,"state":3157,"title":3158,"updated_at":3159,"url":3160,"score":3161},"### 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",[3148,3151,3153],{"name":3149,"color":3150},"3.x","29bc7f",{"name":3135,"color":3152},"E99695",{"name":3154,"color":3155},"needs reproduction","FBCA04",15073,"closed","Unable to get a running env with `nuxt/test-utils`","2023-01-19T17:44:36Z","https://github.com/nuxt/nuxt/issues/15073",0.6257594,{"labels":3163,"number":3167,"owner":3138,"repository":3138,"state":3157,"title":3168,"updated_at":3169,"url":3170,"score":3171},[3164,3165,3166],{"name":3149,"color":3150},{"name":3135,"color":3152},{"name":3154,"color":3155},14451,"createTest from @nuxt/test-utils-edge can't load nuxt","2023-01-19T17:35:34Z","https://github.com/nuxt/nuxt/issues/14451",0.6259388,{"labels":3173,"number":3176,"owner":3138,"repository":3138,"state":3157,"title":3177,"updated_at":3178,"url":3179,"score":3180},[3174,3175],{"name":3149,"color":3150},{"name":3135,"color":3152},13601,"When I configuration vite to false","2023-01-19T17:00:22Z","https://github.com/nuxt/nuxt/issues/13601",0.63167024,{"description":3182,"labels":3183,"number":3186,"owner":3138,"repository":3138,"state":3157,"title":3187,"updated_at":3188,"url":3189,"score":3190},"### 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",[3184,3185],{"name":3149,"color":3150},{"name":3135,"color":3152},15315,"Issues running Vitest within Nuxt3","2023-01-30T12:17:13Z","https://github.com/nuxt/nuxt/issues/15315",0.6366541,{"description":3192,"labels":3193,"number":3195,"owner":3138,"repository":3138,"state":3157,"title":3196,"updated_at":3197,"url":3198,"score":3199},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.17.1`\n- Nuxt Version: `4.0.2`\n- CLI Version: `3.27.0`\n- Nitro Version: `2.12.4`\n- Package Manager: `npm@10.9.2`\n- Builder: `-`\n- User Config: `compatibilityDate`, `devtools`, `modules`\n- Runtime Modules: `@nuxt/test-utils/module@3.19.2`\n- Build Modules: `-`\n\n\n(I was also able to reproduce it on stackblitz)\n\n### Reproduction\n\n[A minimal repro](https://github.com/Zachiah/testing-nuxt2). Just run `npx vitest`. I've had to run it close to 10 times before getting the error sometimes. It is very inconsistent. \n\n### Describe the bug\nJust followed the steps from [the nuxt docs on testing](https://nuxt.com/docs/4.x/getting-started/testing) on a newly generated template. Running `npx vitest` sometimes works just fine and other times spits out the error: \"AggregateError: Failed to initialize projects. There were errors during projects setup. See below for more details.\"\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3194],{"name":3135,"color":3152},32814,"Testing is broken when following docs","2025-08-31T20:49:04Z","https://github.com/nuxt/nuxt/issues/32814",0.6374168,{"labels":3201,"number":3204,"owner":3138,"repository":3138,"state":3157,"title":3205,"updated_at":3206,"url":3207,"score":3208},[3202,3203],{"name":3149,"color":3150},{"name":3135,"color":3152},13551,"Build error 'Could not load #_config' with `ssr: false`","2023-01-19T16:59:18Z","https://github.com/nuxt/nuxt/issues/13551",0.6381973,{"description":3210,"labels":3211,"number":3214,"owner":3138,"repository":3138,"state":3157,"title":3215,"updated_at":3216,"url":3217,"score":3218},"### Environment\n\n```\r\nRootDir: /home/projects/github-5xevxq 10:58:45\r\nNuxt project info: 10:58:45\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.14.2`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\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```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-5xevxq?file=index.spec.ts\n\n### Describe the bug\n\nRunning `npm run test` results in the following error message:\r\n\r\n```\r\n FAIL index.spec.ts [ index.spec.ts ]\r\nError: Vitest was initialized with native Node instead of Vite Node.\r\n\r\nOne of the following is possible:\r\n- \"vitest\" is imported outside of your tests (in that case, use \"vitest/node\" or import.meta.vitest)\r\n- \"vitest\" is imported inside \"globalSetup\" (use \"setupFiles\", because \"globalSetup\" runs in a different context)\r\n- Your dependency inside \"node_modules\" imports \"vitest\" directly (in that case, inline that dependency, using \"deps.inline\" config)\r\n- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues\r\n\r\n ❯ eval index.spec.ts:5:3\r\n 3| \r\n 4| describe('Foo', async () => {\r\n 5| await setup();\r\n | ^\r\n 6| \r\n 7| test('Bar', () => {\r\n\r\n\r\n\r\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯\r\n\r\n Test Files 1 failed (1)\r\n Tests no tests\r\n Start at 10:58:00\r\n Duration 6.46s (transform 1.01s, setup 0ms, collect 0ms, tests 0ms)\r\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3212,3213],{"name":3149,"color":3150},{"name":3135,"color":3152},15751,"Vitest was initialized with native Node instead of Vite Node","2023-01-22T23:03:07Z","https://github.com/nuxt/nuxt/issues/15751",0.63948554,{"description":3220,"labels":3221,"number":3229,"owner":3138,"repository":3138,"state":3157,"title":3230,"updated_at":3231,"url":3232,"score":3233},"### Environment\n\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v14.18.0`\r\n- Nuxt Version: `3-3.0.0-27237303.6acfdcd`\r\n- Package Manager: `Yarn`\r\n- Bundler: `Webpack`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\n\n### Describe the bug\n\nBuild fails with a plugin and tsconfig.json extending generated .nuxt/tsconfig.json\n\n### Reproduction\n\nUsing a starter with `tsconfig.json` with : \r\n\r\n```json\r\n{\r\n \"extends\": \"./.nuxt/tsconfig.json\"\r\n}\r\n```\r\n\r\nAnd adding a simple `plugins/test.ts` : \r\n\r\n```ts\r\nimport { defineNuxtPlugin } from '#app'\r\nexport default defineNuxtPlugin(nuxt => {})\r\n```\r\n\r\nRunning `yarn dev` is OK, but `yarn build` fails \r\n\r\n```\r\nyarn run v1.22.15\r\n$ nuxt build\r\nNuxt CLI v3.0.0-27237303.6acfdcd 22:30:53\r\n✔ Generated nuxt.d.ts 22:30:54\r\n\r\n ERROR [vite:esbuild] failed to resolve \"extends\":\"./.nuxt/tsconfig.json\" in /home/bicou/tmp/nuxt3-app/tsconfig.json 22:30:55\r\nfile: /home/bicou/tmp/nuxt3-app/plugins/test.ts\r\n\r\n\r\n ERROR failed to resolve \"extends\":\"./.nuxt/tsconfig.json\" in /home/bicou/tmp/nuxt3-app/tsconfig.json 22:30:55\r\n\r\n at resolveExtends (node_modules/vite/dist/node/chunks/dep-713b45e1.js:22044:11)\r\n at parseExtends (node_modules/vite/dist/node/chunks/dep-713b45e1.js:22028:34)\r\n at parse$e (node_modules/vite/dist/node/chunks/dep-713b45e1.js:21979:24)\r\n at async loadTsconfigJsonForFile (node_modules/vite/dist/node/chunks/dep-713b45e1.js:22311:24)\r\n at async transformWithEsbuild (node_modules/vite/dist/node/chunks/dep-713b45e1.js:22157:36)\r\n at async Object.transform (node_modules/vite/dist/node/chunks/dep-713b45e1.js:22241:32)\r\n at async ModuleLoader.addModuleSource (node_modules/rollup/dist/shared/rollup.js:22105:30)\r\n at async ModuleLoader.fetchModule (node_modules/rollup/dist/shared/rollup.js:22158:9)\r\n at async Promise.all (index 2)\r\n at async ModuleLoader.fetchStaticDependencies (node_modules/rollup/dist/shared/rollup.js:22193:34)\r\n\r\nerror Command failed with exit code 1.\r\n```\r\n\n\n### Additional context\n\nSeems like build command load plugins before generating .nuxt/tsconfig.json ...\n\n### Logs\n\n_No response_",[3222,3223,3226],{"name":3149,"color":3150},{"name":3224,"color":3225},"bug","d73a4a",{"name":3227,"color":3228},"upstream","E8A36D",12074,"Build fails missing .nuxt/tsconfig.json","2023-01-19T15:54:28Z","https://github.com/nuxt/nuxt/issues/12074",0.64104104,{"labels":3235,"number":3238,"owner":3138,"repository":3138,"state":3157,"title":3239,"updated_at":3240,"url":3241,"score":3242},[3236,3237],{"name":3149,"color":3150},{"name":3135,"color":3152},13625,"Running `yarn dev` fails on clean nuxt install","2023-01-19T17:02:42Z","https://github.com/nuxt/nuxt/issues/13625",0.64140177,["Reactive",3244],{},["Set"],["ShallowReactive",3247],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f5eOurz-AK58O8WwqJl-U-om4U-IvRNFcndOpf9gWoBo":-1},"/nuxt/test-utils/1375"]