\n \u003CNuxtWelcome />\n \u003C/div>\n\u003C/template>\n\n\u003Cscript setup lang=\"ts\">\nconsole.log(\"111\");\n\u003C/script>\n```\n\n### Expected Behavior\nBuilt-in components should be auto-imported without errors during development.\n\n### Actual Behavior\nConsole errors occur for built-in components (e.g., `NuxtWelcome`), and auto-importing fails.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nWARN [Vue warn]: Failed to resolve component: NuxtRouteAnnouncer\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. \n at \u003CApp> \n at \u003CNuxtRoot>\n\nthis is setup\n```",[3042],{"name":3030,"color":3031},32290,"closed","[Bug] AutoImport Fails for Components with `vite.esbuild.minifyWhitespace=true` in Dev Mode","2025-06-06T04:42:30Z","https://github.com/nuxt/nuxt/issues/32290",0.6202735,{"description":3050,"labels":3051,"number":3060,"owner":3033,"repository":3033,"state":3044,"title":3061,"updated_at":3062,"url":3063,"score":3064},"### Environment\n\n------------------------------\r\n- Operating System: `Windows_NT`\r\n- Node Version: `v16.16.0`\r\n- Nuxt Version: `3.2.3`\r\n- Nitro Version: `2.2.3`\r\n- Package Manager: `npm@9.4.0`\r\n- Builder: `vite`\r\n- User Config: `alias`, `app`, `build`, `imports`, `modules`, `naiveUI`, `ssr`, `supabase`, `runtimeConfig`, `tailwindcss`, `typescript`\r\n- Runtime Modules: `@vueuse/nuxt@9.13.0`, `@nuxtjs/tailwindcss@6.4.1`, `@pinia/nuxt@0.4.7`, `@nuxtjs/critters@0.4.0`, `@nuxtjs/fontaine@0.2.4`, `@nuxtjs/google-fonts@3.0.0-1`, `@nuxt/image-edge@1.0.0-27954023.4cee565`, `nuxt-headlessui@1.1.1`, `@nuxtjs/supabase@0.3.1`, `@formkit/nuxt@1.0.0-beta.15`, `@huntersofbook/naive-ui-nuxt@0.7.1` \r\n- Build Modules: `-`\n\n### Reproduction\n\nI am sorry to open this without a reproduction, but I simply cannot reproduce this. It happens in a specific repo, and I have tried thousands of things, though cannot find what causes the issue. \r\n\r\nI am opening this issue so that people can weigh in and if there are others experiencing this, they can use the hack I've found (see below).\n\n### Describe the bug\n\nAuto import of my components work great. But their types are not recognized in VS Code. Whenever I hover over a component in the `\u003Ctemplate>` section of an SFC, its type is indicated as `any`. \r\n\r\nIt is very weird but I've found a hack: When I reference the `.nuxt/components` path anywhere in the project, the types start working. So I added this line to my `app.vue` file:\r\n\r\n```\r\nimport {} from \".nuxt/components\";\r\n``` \r\n\r\nI think something is causing Nuxt to ignore the `.nuxt/components` path but when I reference it somewhere, Nuxt starts recognizing it back.\r\n\r\nI'd be forever grateful if someone knows what is going on here and suggest where to look.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3052,3055,3058],{"name":3053,"color":3054},"3.x","29bc7f",{"name":3056,"color":3057},"pending triage","E99695",{"name":3059,"color":3031},"needs reproduction",19427,"Auto imported component types do not work","2023-03-08T08:40:06Z","https://github.com/nuxt/nuxt/issues/19427",0.6365351,{"description":3066,"labels":3067,"number":3076,"owner":3033,"repository":3033,"state":3044,"title":3077,"updated_at":3078,"url":3079,"score":3080},"### Environment\n\n- Operating System: Windows_NT\n- Node Version: v18.16.0\n- Nuxt Version: 3.4.3\n- Nitro Version: 2.4.0\n- Package Manager: pnpm@8.5.0\n- Builder: vite\n- User Config: experimental, modules, colorMode\n- Runtime Modules: @unocss/nuxt@0.51.12, @vueuse/nuxt@10.1.2, nuxt-icon@0.4.0, nuxt-swiper@1.1.0, @nuxt/devtools@0.4.6, @nuxt/image-edge@1.0.0-28020728.5df24eb, @nuxtjs/color-mode@3.2.0\n- Build Modules: -\n\n### Reproduction\n\n\n\nThis error doesn't seem to be reproducible on Stackblitz so I have included a [github repo](https://github.com/tobychidi/nuxt-utils-import-error)\n\n### Describe the bug\n\nWhen functions are auto-imported from utils/ composables and used in Vue SFC Template, VsCode throws and error. Yes, I use the latest volar. This error appeared after `pnpm up` That bumped my Vue version to 3.3.1.\n\nI have not tried reverting Vue versions though. \n\n### Additional context\n\nExample: \n```\nProperty 'useShowSnack' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: { key?: string | number | symbol | undefined; ref?: VNodeRef | undefined; ref_for?: boolean | undefined; ... 8 more ...; style?: unknown; }; ... 10 more ...; $watch\u003CT extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (arg...'.ts(2339)\n```\n\n_No response_\n\n### Logs\n\n_No response_",[3068,3069,3070,3073],{"name":3053,"color":3054},{"name":3021,"color":3022},{"name":3071,"color":3072},"upstream","E8A36D",{"name":3074,"color":3075},"upstream-bug","B60205",20827,"TS Error with auto-imports from composables and utils in Vue Template after 3.3","2024-11-07T20:13:37Z","https://github.com/nuxt/nuxt/issues/20827",0.6455203,{"description":3082,"labels":3083,"number":3086,"owner":3033,"repository":3033,"state":3044,"title":3087,"updated_at":3088,"url":3089,"score":3090},"### Environment\n\nN/A\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-pqgjqen4?file=demo.mjs\n\n### Describe the bug\n\nCode that utilizes [named imports/exports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#named_import) that have the string syntax to declare arbitrary (non js identifier) names, fail to build with nuxt 3.16.0 (dev mode works). Build works when downgrading back to 3.15.4.\n\n```js\nconst a = 10\n\nexport { a as 'name.with.dots' }\n```\n\n```vue\n\u003Ctemplate>\n \u003Cdiv>\n \u003CNuxtRouteAnnouncer />\n \u003CNuxtWelcome />\n \u003C/div>\n\u003C/template>\n\n\u003Cscript lang=\"js\">\nimport * as demo from './demo.mjs'\n\nconsole.log(demo['name.with.dots'])\n\u003C/script>\n\n```\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n> build\n> nuxt build\n\nNuxt 3.16.0 with Nitro 2.11.5 nuxi 18:04:46\nℹ Building for Nitro preset: node-server nuxi 18:04:46\nℹ Building client... 18:04:47\nℹ vite v6.2.1 building for production... 18:04:47\nℹ ✓ 128 modules transformed. 18:04:48\nℹ .nuxt/dist/client/manifest.json 1.06 kB │ gzip: 0.29 kB 18:04:48\nℹ .nuxt/dist/client/_nuxt/error-500.dGVH929u.css 1.88 kB │ gzip: 0.72 kB 18:04:48\nℹ .nuxt/dist/client/_nuxt/error-404.C3V-3Mc4.css 3.56 kB │ gzip: 1.10 kB 18:04:48\nℹ .nuxt/dist/client/_nuxt/entry.ofCu9KLV.css 12.41 kB │ gzip: 2.57 kB 18:04:48\nℹ .nuxt/dist/client/_nuxt/z7DXRpCd.js 3.39 kB │ gzip: 1.53 kB 18:04:48\nℹ .nuxt/dist/client/_nuxt/DUuvXmrT.js 9.42 kB │ gzip: 3.76 kB 18:04:48\nℹ .nuxt/dist/client/_nuxt/y94aZ4V3.js 220.05 kB │ gzip: 63.21 kB 18:04:48\nℹ ✓ built in 906ms 18:04:48\n✔ Client built in 921ms 18:04:48\nℹ Building server... 18:04:48\nℹ vite v6.2.1 building SSR bundle for production... 18:04:48\nℹ ✓ 53 modules transformed. 18:04:48\n\n ERROR ✗ Build failed in 350ms 18:04:48\n\n\n ERROR Nuxt Build Error: [vite:esbuild-transpile] Transform failed with 1 error: nuxi 18:04:48\ndemo.mjs:3:14: ERROR: Using the string \"name.with.dots\" as an export name is not supported in the configured target environment (\"chrome87\", \"edge88\", \"es2020\", \"firefox78\", \"safari14\" + 2 overrides)\nfile: demo.mjs:3:14\n\nUsing the string \"name.with.dots\" as an export name is not supported in the configured target environment (\"chrome87\", \"edge88\", \"es2020\", \"firefox78\", \"safari14\" + 2 overrides)\n1 | const a = 10;\n2 |\n3 | export { a as \"name.with.dots\" };\n | ^\n\n\n demo.mjs:3:14: ERROR: Using the string \"name.with.dots\" as an export name is not supported in the configured target environment (\"chrome87\", \"edge88\", \"es2020\", \"firefox78\", \"safari14\" + 2 overrides)\n file: demo.mjs:3:14\n\n Using the string \"name.with.dots\" as an export name is not supported in the configured target environment (\"chrome87\", \"edge88\", \"es2020\", \"firefox78\", \"safari14\" + 2 overrides)\n 1 | const a = 10;\n 2 |\n 3 | export { a as \"name.with.dots\" };\n | ^\n\n at failureErrorWithLog (node_modules\\esbuild\\lib\\main.js:1477:15)\n at node_modules\\esbuild\\lib\\main.js:756:50\n at responseCallbacks.\u003Ccomputed> (node_modules\\esbuild\\lib\\main.js:623:9)\n at handleIncomingPacket (node_modules\\esbuild\\lib\\main.js:678:12)\n at Socket.readFromStdout (node_modules\\esbuild\\lib\\main.js:601:7)\n at Socket.emit (node:events:524:28)\n at addChunk (node:internal/streams/readable:561:12)\n at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)\n at Readable.push (node:internal/streams/readable:392:5)\n at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)\n\n```",[3084,3085],{"name":3021,"color":3022},{"name":3056,"color":3057},31266,"Building code dependent on named imports fails in 3.16.0","2025-04-18T11:02:36Z","https://github.com/nuxt/nuxt/issues/31266",0.64870685,{"labels":3092,"number":3096,"owner":3033,"repository":3033,"state":3044,"title":3097,"updated_at":3098,"url":3099,"score":3100},[3093,3094,3095],{"name":3053,"color":3054},{"name":3056,"color":3057},{"name":3059,"color":3031},13573,"[Hard to reproduce] Issue with auto-import of composables in some components","2023-01-19T16:59:51Z","https://github.com/nuxt/nuxt/issues/13573",0.65894014,{"description":3102,"labels":3103,"number":3106,"owner":3033,"repository":3033,"state":3044,"title":3107,"updated_at":3108,"url":3109,"score":3110},"### Environment\r\n\r\nNuxt module using `@nuxt/kit` rc 9\r\n\r\n### Reproduction\r\n\r\nBlank project using my nuxt-xstate module which after updating relies on `imports:sources`\r\n\r\nOnline module playground: https://stackblitz.com/edit/nuxt-xstate-playground\r\nSource code: https://github.com/Lexpeartha/nuxt-xstate\r\n\r\nUPDATE: after bumping nuxt to rc 9 on stackblitz, it seems to work, however fresh project still doesn't work as it's supposed to\r\n\r\n### Describe the bug\r\n\r\nTypes for auto-imports aren't generated, and when starting dev server errors are thrown:\r\n```\r\nERROR Failed to resolve import \"ufo\" from \"virtual:nuxt:/home/aleksa/Desktop/Projects/xstate-test/.nuxt/paths.mjs\". Does the file exist?\r\n\r\n ERROR Failed to resolve import \"defu\" from \".nuxt/app.config.mjs\". Does the file exist? \r\n ```\r\n \r\n One very weird thing is that module works without any issues in my module playground, but behaves like this in any other environment\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell\r\n[nuxt] [request error] [unhandled] [500] [vite-node] Failed to load ufo\r\n at ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:165:13) \r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) \r\n at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:113:12) \r\n at async request (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:136:16) \r\n at async virtual:nuxt:./.nuxt/paths.mjs:1:238 \r\n at async ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:217:5) \r\n at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:113:12) \r\n at async request (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:136:16) \r\n at async ./node_modules/.pnpm/nuxt@3.0.0-rc.9/node_modules/nuxt/dist/app/entry.mjs:5:31 \r\n at async ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:217:5)\r\n[nuxt] [request error] [unhandled] [500] [vite-node] Failed to load ufo\r\n at ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:165:13) \r\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5) \r\n at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:113:12) \r\n at async request (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:136:16) \r\n at async virtual:nuxt:./.nuxt/paths.mjs:1:238 \r\n at async ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:217:5) \r\n at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:113:12) \r\n at async request (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:136:16) \r\n at async ./node_modules/.pnpm/nuxt@3.0.0-rc.9/node_modules/nuxt/dist/app/entry.mjs:5:31 \r\n at async ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@0.22.1/node_modules/vite-node/dist/client.mjs:217:5)\r\n```\r\n```\r\n",[3104,3105],{"name":3053,"color":3054},{"name":3056,"color":3057},14814,"bug(kit): added auto-imports don't work","2023-01-19T17:40:40Z","https://github.com/nuxt/nuxt/issues/14814",0.6613711,{"description":3112,"labels":3113,"number":3117,"owner":3033,"repository":3033,"state":3044,"title":3118,"updated_at":3119,"url":3120,"score":3121},"### Environment\r\n\r\n```\r\n------------------------------\r\n- Operating System: Windows_NT\r\n- Node Version: v20.9.0\r\n- Nuxt Version: 3.8.1\r\n- CLI Version: 3.9.1\r\n- Nitro Version: 2.7.2\r\n- Package Manager: pnpm@8.10.5\r\n- Builder: -\r\n- User Config: devtools, experimental, app, modules, vite, css, eslint, mongoose, nitro, image, dayjs, tailwindcss\r\n- Runtime Modules: @pinia/nuxt@0.5.1, @nuxtjs/eslint-module@4.1.0, @vueuse/nuxt@10.6.1, @nuxt/image@1.0.0, @nuxtjs/device@3.1.1, @nuxtjs/color-mode@3.3.2, @nuxt/content@2.9.0, nuxt-icon@0.6.6, @element-plus/nuxt@1.0.7, @nuxtjs/tailwindcss@6.9.5, nuxt-mongoose@1.0.3, dayjs-nuxt@2.1.9\r\n- Build Modules: -\r\n------------------------------\r\n```\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/maicss/nuxt-auto-import-style-control\r\n\r\n### Describe the bug\r\n\r\nhttps://github.com/element-plus/element-plus-nuxt/issues/77\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3114,3115,3116],{"name":3053,"color":3054},{"name":3056,"color":3057},{"name":3059,"color":3031},24508,"Auto import caused style inject order not expected","2024-01-10T12:53:20Z","https://github.com/nuxt/nuxt/issues/24508",0.6614043,{"description":3123,"labels":3124,"number":3127,"owner":3033,"repository":3033,"state":3044,"title":3128,"updated_at":3129,"url":3130,"score":3131},"### Environment\r\n\r\nENV\r\nos: Darwin\r\nnodejs: 20.9.0\r\nnuxt: 3.8.1\r\n@nuxt/test-utils: 3.8.1\r\nvitest: 1.1.1\r\nyarn: 1.15.2\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-rx4vx2?file=package.json,testUtils.js,testUtils.test.js\r\n\r\nyou can run test command below.\r\n```\r\nnpm test\r\n``` \r\n\r\n### Describe the bug\r\n\r\nHello, I am using Vitest for testing on Nuxt3, vite env.\r\nDue to our team's convention, the configuration uses 'autoImport: false'.(For an explicit declaration) So when importing Nuxt's built-in items (useRoute, nextTick, computed, etc.) we use import '#imports'.\r\n\r\nWhen I run Vitest, the following error occurs:\r\n\r\nError: Failed to resolve import \"#imports\" from \"[file path]\". Does the file exist?\r\nHow do I solve this? help.\r\nIs this something that needs to be fixed in vitest?\r\n(I registered an issue on vitest. https://github.com/vitest-dev/vitest/issues/4853)\r\n(https://github.com/nuxt/nuxt/discussions/24719)\r\n\r\nBelow is my vitest.config.js\r\n```javascript\r\nimport path from 'path';\r\nimport vue from '@vitejs/plugin-vue';\r\n\r\nexport default {\r\n plugins: [vue()],\r\n test: {\r\n globals: true,\r\n environment: 'jsdom'\r\n },\r\n resolve: {\r\n alias: {\r\n '@': path.resolve(__dirname, './src')\r\n }\r\n }\r\n};\r\n``` \r\n\r\nThanks.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3125,3126],{"name":3053,"color":3054},{"name":3056,"color":3057},25021,"Vitest can't resolve import '#imports'(Nuxt3, vitest)","2024-06-21T04:50:44Z","https://github.com/nuxt/nuxt/issues/25021",0.66205615,{"labels":3133,"number":3136,"owner":3033,"repository":3033,"state":3044,"title":3137,"updated_at":3138,"url":3139,"score":3140},[3134,3135],{"name":3053,"color":3054},{"name":3056,"color":3057},21803,"Dynamic Imports Are not working inside script tags.","2024-07-08T20:33:35Z","https://github.com/nuxt/nuxt/issues/21803",0.66242224,["Reactive",3142],{},["Set"],["ShallowReactive",3145],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fgg2VxecsZCUOFwU8ApVHoEBTXpa7-IPPCb5DgWpgNYc":-1},"/nuxt/nuxt/28190"]