\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).",[3185],{"name":3172,"color":3173},1322,"Support Vitest `projects` option for Browser Mode","2025-06-18T13:51:03Z","https://github.com/nuxt/test-utils/issues/1322",0.67148703,{"description":3192,"labels":3193,"number":3196,"owner":3175,"repository":3175,"state":3177,"title":3197,"updated_at":3198,"url":3199,"score":3200},"### 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```",[3194],{"name":3172,"color":3195},"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,{"description":3202,"labels":3203,"number":3205,"owner":3175,"repository":3176,"state":3177,"title":3206,"updated_at":3207,"url":3208,"score":3209},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.17.0`\n- Nuxt Version: `4.1.2`\n- CLI Version: `3.28.0`\n- Nitro Version: `2.12.6`\n- Package Manager: `npm@11.6.0`\n- Builder: `-`\n- User Config: `compatibilityDate`, `devtools`, `modules`\n- Runtime Modules: `@nuxt/test-utils@3.19.2`\n- Build Modules: `-`\n\n\n### Reproduction\n\nhttps://github.com/fimion/nuxt-test-utils-projects-problem\n\n### Describe the bug\n\nWhen using `defineConfig` from `vitest/config` to glob import project definitions from separate config files, `defineVitestProject` will error out if it is used multiple times.\n\nExample, component testing with auto mocked data vs actual endpoints.\n\nThe issue has something to do with how defineVitestProject gets run when dynamically imported by `vitest` and `defineVitestProject` will attempt to spin up a nuxt instance to get the configuration. Multiple instances attempt to run at the same time, and this causes anything after the first project read in to fail.\n\n\n\n\n\n### Additional context\n\nWe ran into this issue as we were attempting to create a way to quickly add new testing setups in a monorepo. The solution for us was one of a couple of possibilities:\n\n- wrap `defineVitestProject` in a call using a curried method call created by `limitConcurrency(1)` from `@vitest/runner/utils` which causes each call of `defineVitestProject` to be run in sequence rather than simultaneously.\n- similarly, create a shared chain of promises that causes each call of `defineVitestProject` to run in sequence.\n- manually create a `vite-node` instance and read in the `projects` definitions manually before `vitest` can attempt to run it's process. then await each call of `defineVitestProject` manually.\n\nThis may be more of an upstream issue? I'm not entirely sure.\n\n### Logs\n\n```shell-script\n> test\n> vitest --run\n\n\n RUN v3.2.4 /Users/alex.riviere/WebstormProjects/nuxt-test-utils-project-collision\n\n ✓ Unit app/components/HelloWorld.unit.ts (1 test) 7ms\n\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯\n\n FAIL Integration app/components/HelloWorld.integration.ts [ app/components/HelloWorld.integration.ts ]\nError: Failed to resolve import \"#app/nuxt-vitest-app-entry\" from \"node_modules/@nuxt/test-utils/dist/runtime/shared/nuxt.mjs\". Does the file exist?\n Plugin: vite:import-analysis\n File: /Users/alex.riviere/WebstormProjects/nuxt-test-utils-project-collision/node_modules/@nuxt/test-utils/dist/runtime/shared/nuxt.mjs:3:15\n 1 | export async function setupNuxt() {\n 2 | const { useRouter } = await import(\"#app/composables/router\");\n 3 | await import(\"#app/nuxt-vitest-app-entry\").then((r) => r.default());\n | ^\n 4 | const nuxtApp = useNuxtApp();\n 5 | await nuxtApp.callHook(\"page:finish\");\n ❯ TransformPluginContext._formatLog node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js:31527:43\n ❯ TransformPluginContext.error node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js:31524:14\n ❯ normalizeUrl node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js:29996:18\n ❯ node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js:30054:32\n ❯ TransformPluginContext.transform node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js:30022:4\n ❯ EnvironmentPluginContainer.transform node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js:31325:14\n ❯ loadAndTransform node_modules/vite/dist/node/chunks/dep-M_KD0XSK.js:26407:26\n\n⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯\n\n\n Test Files 1 failed | 1 passed (2)\n Tests 1 passed (1)\n Start at 12:04:01\n Duration 736ms (transform 266ms, setup 200ms, collect 155ms, tests 7ms, environment 225ms, prepare 222ms)\n\n\nProcess finished with exit code 1\n```",[3204],{"name":3172,"color":3173},1419,"Multiple nuxt environment projects collide if imported via vitest projects","2025-09-17T16:22:14Z","https://github.com/nuxt/test-utils/issues/1419",0.6789428,{"description":3211,"labels":3212,"number":3214,"owner":3175,"repository":3176,"state":3215,"title":3216,"updated_at":3217,"url":3218,"score":3219},"### Environment\n\n- Operating System: `Darwin`\n- Node Version: `v22.17.1`\n- Nuxt Version: `4.0.3`\n- CLI Version: `3.28.0`\n- Nitro Version: `2.12.4`\n- Package Manager: `pnpm@10.13.1`\n- Builder: `-`\n- User Config: `compatibilityDate`, `devtools`, `modules`\n- Runtime Modules: `@nuxt/test-utils@3.19.2`\n- Build Modules: `-`\n\n\n### Reproduction\n\nhttps://github.com/JessicaSachs/nuxt-vitest-flake-repro\n\nI'm looking to use `host` in order to point my e2e tests at an already-built Nuxt application. To run the suite, first build the application:\n\n```sh\npnpm build\n```\n\nAnd then run the tests via:\n\n```sh\npnpm test:e2e\n```\n\n### Describe the bug\n\nI'm unable to run tests reliably. The E2E test run exits after first suite (Either Node or Nuxt) passes. I get flake 20% of the time. My coworker gets it about 80% of the time. Pretty sure it's related to the machine speed.\n\n### Additional context\n\nI've tried doing things like forcing Vitest's parallelization to turn off and poolOptions/maxThreads to be 1. Can't find a workaround rn.\n\n### Logs\n\n```shell-script\nFAIL nuxt test/e2e/home.test.ts [ test/e2e/home.test.ts ]\nError: Failed to resolve import \"#app/nuxt-vitest-app-entry\" from \"node_modules/.pnpm/@nuxt+test-utils@3.19.2_@playwright+test@1.54.1_happy-dom@18.0.1_magicast@0.3.5_playwri_9da3baa23bc5990d9fca0e90d773c266/node_modules/@nuxt/test-utils/dist/runtime/shared/nuxt.mjs\". Does the file exist?\n Plugin: vite:import-analysis\n File: /Users/jess/projects/jess-ecosystem/nuxt-vitest-flake-repro/node_modules/.pnpm/@nuxt+test-utils@3.19.2_@playwright+test@1.54.1_happy-dom@18.0.1_magicast@0.3.5_playwri_9da3baa23bc5990d9fca0e90d773c266/node_modules/@nuxt/test-utils/dist/runtime/shared/nuxt.mjs:3:15\n 1 | export async function setupNuxt() {\n 2 | const { useRouter } = await import(\"#app/composables/router\");\n 3 | await import(\"#app/nuxt-vitest-app-entry\").then((r) => r.default());\n | ^\n 4 | const nuxtApp = useNuxtApp();\n 5 | await nuxtApp.callHook(\"page:finish\");\n```\n\n\u003Cimg width=\"1267\" height=\"1323\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/0ebeea99-f6cd-4c24-bbeb-3172cc55357c\" />",[3213],{"name":3172,"color":3173},1386,"closed","Flaky E2E tests - Cannot resolve import(\"#app/nuxt-vitest-app-entry\")","2025-08-14T13:03:59Z","https://github.com/nuxt/test-utils/issues/1386",0.65020055,{"labels":3221,"number":3232,"owner":3175,"repository":3175,"state":3215,"title":3233,"updated_at":3234,"url":3235,"score":3236},[3222,3225,3226,3229],{"name":3223,"color":3224},"3.x","29bc7f",{"name":3172,"color":3195},{"name":3227,"color":3228},"needs reproduction","FBCA04",{"name":3230,"color":3231},"layers","006B75",25230,"Wrong tsconfig when operating in monorepo","2024-05-24T14:00:23Z","https://github.com/nuxt/nuxt/issues/25230",0.65189075,{"description":3238,"labels":3239,"number":3242,"owner":3175,"repository":3175,"state":3215,"title":3243,"updated_at":3244,"url":3245,"score":3246},"### 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_",[3240,3241],{"name":3223,"color":3224},{"name":3172,"color":3195},20155,"Nuxt Layers - VSCode auto-imports","2024-02-22T08:27:01Z","https://github.com/nuxt/nuxt/issues/20155",0.65499216,{"description":3248,"labels":3249,"number":3252,"owner":3175,"repository":3175,"state":3215,"title":3253,"updated_at":3254,"url":3255,"score":3256},"### 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_",[3250,3251],{"name":3223,"color":3224},{"name":3172,"color":3195},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":3258,"labels":3259,"number":3262,"owner":3175,"repository":3175,"state":3215,"title":3263,"updated_at":3264,"url":3265,"score":3266},"### 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",[3260,3261],{"name":3223,"color":3224},{"name":3172,"color":3195},15315,"Issues running Vitest within Nuxt3","2023-01-30T12:17:13Z","https://github.com/nuxt/nuxt/issues/15315",0.6609384,{"description":3268,"labels":3269,"number":3272,"owner":3175,"repository":3175,"state":3215,"title":3273,"updated_at":3274,"url":3275,"score":3276},"### 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",[3270,3271],{"name":3223,"color":3224},{"name":3172,"color":3195},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,["Reactive",3278],{},["Set"],["ShallowReactive",3281],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fPdlBGmYqawZGLp3I1ZpI4XrBX8anN8dLY1HSRr38MBg":-1},"/nuxt/test-utils/1300"]