",[3033],{"name":3021,"color":3022},32714,"fix(types): v4 auto-import in shared directory","2025-07-21T23:23:54Z","https://github.com/nuxt/nuxt/issues/32714",0.6752389,{"description":3040,"labels":3041,"number":3043,"owner":3024,"repository":3024,"state":3025,"title":3044,"updated_at":3045,"url":3046,"score":3047},"### Environment\n\n------------------------------\n- Operating System: Linux\n- Node Version: v20.19.1\n- Nuxt Version: 4.0.2\n- CLI Version: 3.27.0\n- Nitro Version: 2.12.4\n- Package Manager: pnpm@8.15.6\n- Builder: -\n- User Config: compatibilityDate, devtools, typescript\n- Runtime Modules: -\n- Build Modules: -\n------------------------------\n\n### Reproduction\n\n[reproduction](https://stackblitz.com/edit/github-qvzrtdvv)\n\n### Describe the bug\n\nNuxt will not typecheck the codebase when setting the `typescript.typeCheck` to `build` on nuxt config.\n\nI have placed both typescript errors in `app.vue` and `server/routes/health.ts` files and no errors are thrown on build. Running nuxt typecheck directly will only throw the app.vue error and not the one on the server directory.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[3042],{"name":3021,"color":3022},32823,"[v4]: typecheck on build does not work","2025-07-30T18:29:22Z","https://github.com/nuxt/nuxt/issues/32823",0.67759424,{"description":3049,"labels":3050,"number":3054,"owner":3024,"repository":3055,"state":3056,"title":3057,"updated_at":3058,"url":3059,"score":3060},"### 🐛 The bug\n\nI am getting following Error when running `npx nuxi typecheck` in a fresh project with only `@nuxt/scripts` installed.\r\n\r\nError only occurs if `typescript.strict` ist set to false in nuxt.config.ts.\r\n\r\n```\r\nnode_modules/@nuxt/scripts/dist/runtime/components/ScriptGoogleMaps.vue:288:7 - error TS2578: Unused '@ts-expect-error' directive.\r\n\r\n288 // @ts-expect-error broken\r\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\n\r\nFound 1 error in node_modules/@nuxt/scripts/dist/runtime/components/ScriptGoogleMaps.vue:288\r\n```\r\n\r\n_I've copied most of this issue content from one I've submitted earlier (https://github.com/nuxt/scripts/issues/111) since they're so similar._\n\n### 🛠️ To reproduce\n\nhttps://stackblitz.com/edit/nuxt-starter-qmhrvq\n\n### 🌈 Expected behavior\n\n`npx nuxi typecheck` to succeed in a fresh project with only `@nuxt/scripts` installed where `typescript.strict` ist set to false in nuxt.config.ts.\n\n### ℹ️ Additional context\n\n_No response_",[3051],{"name":3052,"color":3053},"bug","d73a4a",260,"scripts","closed","Typecheck fails in fresh project if typescript.strict = false","2024-09-15T08:44:49Z","https://github.com/nuxt/scripts/issues/260",0.64331037,{"description":3062,"labels":3063,"number":3073,"owner":3024,"repository":3024,"state":3056,"title":3074,"updated_at":3075,"url":3076,"score":3077},"### Environment\n\nNuxi 3.0.0 14:44:58\r\n 14:44:59\r\nRootDir: /home/marco/projects/nuxt3-test 14:44:59\r\nNuxt project info: 14:44:59\r\n\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v16.15.0`\r\n- Nuxt Version: `3.0.0`\r\n- Nitro Version: `1.0.0`\r\n- Package Manager: `npm@8.5.5`\r\n- Builder: `vite`\r\n- User Config: `typescript`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\n👉 Report an issue: https://github.com/nuxt/framework/issues/new 14:44:59\r\n\r\n👉 Suggest an improvement: https://github.com/nuxt/framework/discussions/new\r\n\r\n👉 Read documentation: https://v3.nuxtjs.org\n\n### Reproduction\n\n1. Create new Nuxt project using `npm nuxi init \u003Cproject-name>`\r\n2. Follow instructions to use TypeScript according to https://nuxt.com/docs/guide/concepts/typescript#typescript: `npm i --save-dev vue-tsc typescript`\r\n3. Modify nuxt.config.ts to set typescript.typeCheck to true.\r\n4. Run `npm run dev` and see that it results in the following error: \"Cannot find module 'vue-tsc/out/proxy'\"\r\n\r\nI reproduced the issue in the sandbox below:\r\nhttps://stackblitz.com/edit/github-yrejwg?file=package.json\n\n### Describe the bug\n\nAfter installing `vue-tsc` and `typescript` and setting typescript.typeCheck to true, starting Nuxt results in the following error: \r\n\r\nCannot start nuxt: Cannot find module 'vue-tsc/out/proxy'\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3064,3067,3070],{"name":3065,"color":3066},"3.x","29bc7f",{"name":3068,"color":3069},"upstream","E8A36D",{"name":3071,"color":3072},"upstream-bug","B60205",15640,"Unable to set typescript.typeCheck to true (Cannot start nuxt: Cannot find module 'vue-tsc/out/proxy')","2023-02-21T21:43:40Z","https://github.com/nuxt/nuxt/issues/15640",0.6601634,{"description":3079,"labels":3080,"number":3087,"owner":3024,"repository":3088,"state":3056,"title":3089,"updated_at":3090,"url":3091,"score":3092},"need to run `vue-tsc -b --noEmit` rather than `vue-tsc --noEmit`\n\nrelated https://github.com/nuxt/nuxt/issues/32343",[3081,3084],{"name":3082,"color":3083},"enhancement","a2eeef",{"name":3085,"color":3086},"good first issue","7057ff",926,"cli","support project-based typechecking","2025-06-27T12:28:12Z","https://github.com/nuxt/cli/issues/926",0.6609434,{"description":3094,"labels":3095,"number":3108,"owner":3024,"repository":3024,"state":3056,"title":3109,"updated_at":3110,"url":3111,"score":3112},"### Environment\r\n\r\n- Operating System: `Darwin`\r\n- Node Version: `v18.17.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: `pnpm@8.3.1`\r\n- Builder: `-`\r\n- User Config: `devtools`, `extends`, `runtimeConfig`, `experimental`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-dhni1d?file=app.vue\r\n\r\n### Describe the bug\r\n\r\nI created a Nuxt layer in `./my-layer` and I import `message` from `~/constants/foo` inside the `my-layer`.\r\n\r\nAlthough I know that official [document](https://nuxt.com/docs/guide/going-further/layers#relative-paths-and-aliases) mention that use relative instead of path aliases in layer components, I can successfully execute the `dev` and `build` commands in the root package, and the outcome is fine, seems Nuxt is able to resolve the correct path.\r\n\r\nHowever, I am unable to successfully pass the type checking with the following error.\r\n\r\n```\r\nmy-layer/components/HelloWorld.vue:2:25 - error TS2307: Cannot find module '~/constants/foo' or its corresponding type declarations.\r\n\r\n2 import { message } from '~/constants/foo';\r\n ~~~~~~~~~~~~~~~~~\r\n```\r\n\r\n### Additional context\r\n\r\nI know there are some workaround such as:\r\n- using auto-import\r\n- importing relative path\r\n- custom path alias like `~my-layer/`\r\n\r\nbut sometimes I really want to import by explicit path with only `~/` and pass the type checking to make sure no other type errors in project.\r\n\r\nShould this be resolved from the `tsc` (maybe make a new plugin of top of it to make `tsc` resolve the correct path), or is there another approach I should consider?\r\n\r\n### Logs\r\n\r\n_No response_",[3096,3099,3102,3105],{"name":3097,"color":3098},"types","2875C3",{"name":3100,"color":3101},"workaround available","11376d",{"name":3103,"color":3104},"🍰 p2-nice-to-have","0E8A16",{"name":3106,"color":3107},"layers","006B75",24705,"Typecheck fail when import path aliases in Nuxt layer","2025-06-04T07:13:55Z","https://github.com/nuxt/nuxt/issues/24705",0.66352314,{"description":3114,"labels":3115,"number":3125,"owner":3024,"repository":3024,"state":3056,"title":3126,"updated_at":3127,"url":3128,"score":3129},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.7.4\r\n- CLI Version: 3.9.0\r\n- Nitro Version: 2.6.3\r\n- Package Manager: npm@9.4.2\r\n- Builder: -\r\n- User Config: devtools, modules, typescript\r\n- Runtime Modules: @nuxtseo/module@2.0.0-beta.15\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\n- minimal changes to nuxt config adding `typeCheck: true` and `compilerOptions.noUncheckedIndexedAccess: true`\r\n\r\nhttps://stackblitz.com/edit/github-vdxk2t?file=nuxt.config.ts\r\n\r\n### Describe the bug\r\n\r\nThis highlights an issue when trying to use tsconfig features e.g. `noUncheckedIndexedAccess` or `noUnusedLocals` etc. in a nuxt project to provide stricter code conformance. Any nuxt module you have installed will also be checked for these same rules.\r\n\r\nThis effectively means you cannot use any of the tsconfig rules for the risk of a module developer not adhering to those same standards.\r\n\r\nNuxt should not be type checking any installed modules as part of build with the same tsconfig rules defined at the project level. Providing access to all tsconfig properties is misleading as they effectively don't work with the nuxt ecosystem unless you have a raw project.\r\n\r\nThe repro and logs below show how this fails for the `@nuxtseo/module` module but this error is present in a number of modules I have tried to use e.g. `content`\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell-script\r\nERROR 21:54:09\r\n ERROR(vue-tsc) Type '{ icon: string; label: false; ariaLabel: string | undefined; current?: boolean | undefined; disabled?: boolean | undefined; to?: string | undefined; separator?: string | undefined; hideSeparator?: boolean | undefined; ui?: { ...; } | undefined; }' is not assignable to type 'BreadcrumbItemProps'.\r\n Types of property 'to' are incompatible.\r\n Type 'string | undefined' is not assignable to type 'string'.\r\n Type 'undefined' is not assignable to type 'string'.\r\n FILE /home/projects/github-vdxk2t/node_modules/nuxt-seo-ui/dist/runtime/components/Breadcrumb.vue:46:5\r\n\r\n 44 | }\r\n 45 | if (props.homeIcon) {\r\n > 46 | items[0] = {\r\n | ^^^^^^^^\r\n 47 | ...items[0],\r\n 48 | icon: 'material-symbols:home-outline-rounded',\r\n 49 | label: false,\r\n\r\n[vue-tsc] Found 1 error. Watching for file changes. (x3)\r\n```\r\n```\r\n",[3116,3119,3120,3121,3122],{"name":3117,"color":3118},"discussion","538de2",{"name":3097,"color":3098},{"name":3065,"color":3066},{"name":3052,"color":3053},{"name":3123,"color":3124},"🔨 p3-minor","FBCA04",23609,"`typeCheck` reports errors from modules when using `tsconfig` rules","2023-11-30T07:26:56Z","https://github.com/nuxt/nuxt/issues/23609",0.6664073,{"description":3131,"labels":3132,"number":3135,"owner":3024,"repository":3024,"state":3056,"title":3136,"updated_at":3137,"url":3138,"score":3139},"### Environment\r\n\r\n- Operating System: Linux\r\n- Node Version: v20.9.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: pnpm@8.11.0\r\n- Builder: -\r\n- User Config: devtools, typescript, imports, components\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/github-ydvwun?file=app.vue\r\n\r\nThe error does not show immediately when the application starts. \r\nEdit the HTML of `app.vue` and save. The error is then shown\r\n\r\n### Describe the bug\r\n\r\nWhen using `\"allowJs\": false` in `tsconfig.json` and `typeCheck: true` is `nuxt.config.ts`, the following error is thrown by `vue-tsc` after an `hmr update` by editing a file:\r\n```\r\n ERROR(vue-tsc) File '/home/david/projects/no-js-error/node_modules/.pnpm/@nuxt+ui-templates@1.3.1/node_modules/@nuxt/ui-templates/dist/templates/welcome.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?\r\n The file is in the program because:\r\n Root file specified for compilation\r\n FILE undefined:\r\n\r\nundefined\r\n```\r\n\r\nThe `NuxtWelcome` component is not used in `app.vue`, but is included in `.nuxt/components.d.ts` along with many other unused components.\r\n\r\nI assumed, at the very least, the bundled components should be typescript components, or, preferably (and what I expected), unused components should not be bundled\r\n\r\n### Additional context\r\n\r\nTested with `npm` and `pnpm` and the same behavior is observed in both cases\r\n\r\n### Logs\r\n\r\n```shell-script\r\ndavid@david-desktop:~/projects/no-js-error$ pnpm run dev\r\n\r\n> nuxt-app@ dev /home/david/projects/no-js-error\r\n> nuxt dev\r\n\r\nNuxt 3.8.2 with Nitro 2.8.1 11:46:35\r\n 11:46:35\r\n ➜ Local: http://localhost:3000/\r\n ➜ Network: use --host to expose\r\n\r\n ➜ DevTools: press Shift + Alt + D in the browser (v1.0.5) 11:46:36\r\n\r\nℹ Vite server warmed up in 1125ms 11:46:37\r\nℹ Vite client warmed up in 1338ms 11:46:37\r\n✔ Nitro built in 390 ms nitro 11:46:38\r\n\r\n ERROR 11:46:38\r\n[vue-tsc] Found 0 errors. Watching for file changes.\r\n\r\nℹ hmr update /app.vue\r\n\r\n ERROR 11:46:45\r\n ERROR(vue-tsc) File '/home/david/projects/no-js-error/node_modules/.pnpm/@nuxt+ui-templates@1.3.1/node_modules/@nuxt/ui-templates/dist/templates/welcome.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option?\r\n The file is in the program because:\r\n Root file specified for compilation\r\n FILE undefined:\r\n\r\nundefined\r\n\r\n[vue-tsc] Found 1 error. Watching for file changes.\r\n```\r\n",[3133,3134],{"name":3097,"color":3098},{"name":3021,"color":3022},24651,"Cannot use typescript typeCheck and allowJs: false simultaneously. vue-tsc error thrown","2025-05-30T11:26:47Z","https://github.com/nuxt/nuxt/issues/24651",0.6668167,{"description":3141,"labels":3142,"number":3147,"owner":3024,"repository":3024,"state":3056,"title":3148,"updated_at":3149,"url":3150,"score":3151},"### Environment\n\n```\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v16.20.0\r\n- Nuxt Version: 3.6.3\r\n- Nitro Version: 2.5.2\r\n- Package Manager: npm@9.4.2\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-fmsgrj?file=tsconfig.json,components%2FHello.vue,app.vue,package.json,types%2Ftest.d.ts\r\n\r\n\r\n1. Run `npm run typecheck`\r\n2. Run `npm run dev`\n\n### Describe the bug\n\nI've tried to create globally available types for my Nuxt app and I've failed after many attempts.\r\n\r\nWhen you create a `types.d.ts` file with a type declaration it is available in the IDE and `nuxi typecheck` works like a charm not reporting any errors. However, when `nuxi dev` or `nuxi build` is run, it fails throwing `Unresolvable type reference or unsupported built-in utility type ` error.\r\n\r\n```ts\r\n// types.d.ts\r\ndeclare interface MyProps {\r\n prop: string\r\n}\r\n```\r\n\r\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nNuxi 3.6.3 12:58:56 AM\r\nNuxt 3.6.3 with Nitro 2.5.2 12:58:56 AM\r\n 12:59:00 AM\r\n > Local: http://localhost:3000/ \r\n > Network: http://192.168.1.104:3000/\r\n\r\n\r\n ERROR [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type 12:59:06 AM\r\n\r\n/home/projects/github-fmsgrj/components/Hello.vue\r\n1 | \u003Cscript setup lang=\"ts\">\r\n2 | const props = defineProps\u003CTestProps>();\r\n | ^^^^^^^^^\r\n3 | \u003C/script>\r\n4 | \r\n\r\nℹ Vite client warmed up in 1617ms 12:59:07 AM\r\n✔ Nitro built in 867 ms \r\n```\n```\n",[3143,3144,3145,3146],{"name":3097,"color":3098},{"name":3065,"color":3066},{"name":3021,"color":3022},{"name":3068,"color":3069},22209,"`dev` and `build` do not recognize declared types but `typecheck` does.","2023-07-19T10:28:26Z","https://github.com/nuxt/nuxt/issues/22209",0.66900915,["Reactive",3153],{},["Set"],["ShallowReactive",3156],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fsWDcJwfDWDm2sbKvln8gJlZ7IzFNrZx-lY2xS-T0iaY":-1},"/nuxt/cli/944"]