-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type errors on slots with vue-tsc 2.2.4 #3405
Comments
Looks like it is because of the update of vue-tsc from 2.2.0 to 2.2.4 |
Indeed, we still have to look into this. I'd recommend setting the resolution to |
I wasn't able to fix this error by downgrading. It reduced error count from
I think it may be related to 6120a15, but when I tried using
Which wasn't even touched between this commit and v3.0.0-beta.3. I even tried it patching with pnpm, but I still couldn't make it work. |
I've fixed the I also encountered some issues with |
Yeah, thanks! It fixes this issue for me, but due to vuejs/language-tools#5183 I can't use Update: It seems to be related to vuejs/language-tools#5206 and vuejs/language-tools#5247 but using |
Yeah I also tried |
@benjamincanac are people from |
v3 was released and is sill an issue. |
Downgrading to |
Yup, fixed it for me as well |
also the downgrading work for me 🤷♂️ |
Yup confirm it's working as well. |
I tried different versions: but I still have 50 errors in @nuxt/[email protected] :( Tips for collapsed sections
(edited by moderator for clarity) |
Make sure you set it to 2.2.2 in resolutions field too |
@benjamincanac The issue seems to be resolved in The problem seems to be typing <template v-for="(_, name) in proxySlots" #[name]="slotData: any">
<slot :name="name" v-bind="slotData" />
</template>
|
Unfortunately, even with resolutions, I still have 50 errors. My config:
|
I've also tested different version of vue-tsc: |
We are on vue-tsc 3 alpha, and only have this one error left. |
3.0.0-alpha.2 does indeed fix vuejs/language-tools#5206 for me. Edit: nevermind the "fix" is simply due to broken error mapping once again: vuejs/language-tools#5206 (comment) |
I'm going to take a look at ATM only two aspects of that PR needs to be addressed for it to be reviewed:
|
I'm using Turbo repo. I added the resolution to all "resolutions": {
"typescript": "5.6.3",
"vue-tsc": "^2.2.0"
} However, it displays TS errors. Also, Errors Files
5 ../../node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:104
5 ../../node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:91
6 ../../node_modules/@nuxt/ui/dist/runtime/components/CommandPalette.vue:266
2 ../../node_modules/@nuxt/ui/dist/runtime/components/ContextMenu.vue:128
5 ../../node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:65
1 ../../node_modules/@nuxt/ui/dist/runtime/components/DropdownMenu.vue:138
5 ../../node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:71
5 ../../node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:197
3 ../../node_modules/@nuxt/ui/dist/runtime/components/Stepper.vue:146
6 ../../node_modules/@nuxt/ui/dist/runtime/components/Table.vue:312
4 ../../node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:117
4 ../../node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:168 |
@albertcito You have to remove the |
To fix the build error with @nuxt/ui, downgrade vue-tsc to version 2.0.3 using npm install [email protected] --save-dev. |
Hey, I updated the packages to the latest versions today. ERROR(vue-tsc) Argument of type '{ item: T; index: number; open: boolean; }' is not assignable to parameter of type 'NonNullable<({ leading: SlotProps; default: SlotProps; trailing: SlotProps; content: SlotProps; body: SlotProps; } & DynamicSlots<...>)["leading"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'. . [vue-tsc] Found 44 errors. Watching for file changes.
|
@benjamincanac I think this may have been part of the issue, but not entirely. I first tried downgrading to I also tried downgrading to Nuxt 3.16.1 with Nitro 2.11.8 nuxi 6:06:50 AM
6:06:51 AM
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
➜ DevTools: press Shift + Option + D in the browser (v2.3.2) 6:06:51 AM
ℹ Nuxt Icon server bundle mode is set to local 6:06:53 AM
✔ Vite client built in 24ms 6:06:53 AM
✔ Vite server built in 133ms 6:06:53 AM
ERROR [uncaughtException] getLanguagePlugins is not a function 6:06:53 AM
at Object.apply (node_modules/.pnpm/@volar+typescript@2.1.6/node_modules/@volar/typescript/lib/node/proxyCreateProgram.js:12:67)
at getBuilderCreationParameters (node_modules/.pnpm/vite-plugin-checker@0.9.1_eslint@9.23.0_jiti@2.4.2__optionator@0.9.4_typescript@5.8.2_v_4f24b610efffeedf20cfeb4fd229bbc6/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/typescript.js:130522:18)
at createSemanticDiagnosticsBuilderProgram (node_modules/.pnpm/vite-plugin-checker@0.9.1_eslint@9.23.0_jiti@2.4.2__optionator@0.9.4_typescript@5.8.2_v_4f24b610efffeedf20cfeb4fd229bbc6/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/typescript.js:131177:5)
at createNewProgram (node_modules/.pnpm/vite-plugin-checker@0.9.1_eslint@9.23.0_jiti@2.4.2__optionator@0.9.4_typescript@5.8.2_v_4f24b610efffeedf20cfeb4fd229bbc6/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/typescript.js:133257:22)
at synchronizeProgram (node_modules/.pnpm/vite-plugin-checker@0.9.1_eslint@9.23.0_jiti@2.4.2__optionator@0.9.4_typescript@5.8.2_v_4f24b610efffeedf20cfeb4fd229bbc6/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/typescript.js:133221:7)
at Object.createWatchProgram (node_modules/.pnpm/vite-plugin-checker@0.9.1_eslint@9.23.0_jiti@2.4.2__optionator@0.9.4_typescript@5.8.2_v_4f24b610efffeedf20cfeb4fd229bbc6/node_modules/vite-plugin-checker/dist/checkers/vueTsc/typescript-vue-tsc/lib/typescript.js:133129:3)
at Object.configureServer (node_modules/.pnpm/vite-plugin-checker@0.9.1_eslint@9.23.0_jiti@2.4.2__optionator@0.9.4_typescript@5.8.2_v_4f24b610efffeedf20cfeb4fd229bbc6/node_modules/vite-plugin-checker/src/checkers/vueTsc/main.ts:143:13) However, the one error that still remains is the following, and does not seem to be related to this. Nuxt 3.16.1 with Nitro 2.11.8 nuxi 6:08:17 AM
6:08:17 AM
➜ Local: http://localhost:3000/
➜ Network: use --host to expose
➜ DevTools: press Shift + Option + D in the browser (v2.3.2) 6:08:17 AM
ℹ Nuxt Icon server bundle mode is set to local 6:08:18 AM
✔ Vite client built in 23ms 6:08:18 AM
✔ Vite server built in 138ms 6:08:18 AM
✔ Nuxt Nitro server built in 389ms nitro 6:08:19 AM
ℹ Vite client warmed up in 1ms 6:08:19 AM
✘ [ERROR] Could not resolve "#build/app.config"
node_modules/.pnpm/@nuxt+ui@3.0.2_@babel+parser@7.27.0_db0@0.3.1_embla-carousel@8.5.2_ioredis@5.6.0_magica_31f89cd058d8b77b3442b765da8f3a40/node_modules/@nuxt/ui/dist/runtime/vue/stubs.js:3:22:
3 │ import appConfig from "#build/app.config";
╵ ~~~~~~~~~~~~~~~~~~~
The package import "#build/app.config" is not defined in this "imports" map:
node_modules/.pnpm/@nuxt+ui@3.0.2_@babel+parser@7.27.0_db0@0.3.1_embla-carousel@8.5.2_ioredis@5.6.0_magica_31f89cd058d8b77b3442b765da8f3a40/node_modules/@nuxt/ui/package.json:45:13:
45 │ "imports": {
╵ ^
You can mark the path "#build/app.config" as external to exclude it from the bundle, which will
remove this error and leave the unresolved path in the bundle.
ERROR error while updating dependencies: 6:08:19 AM
Error: Build failed with 1 error:
node_modules/.pnpm/@nuxt+ui@3.0.2_@babel+parser@7.27.0_db0@0.3.1_embla-carousel@8.5.2_ioredis@5.6.0_magica_31f89cd058d8b77b3442b765da8f3a40/node_modules/@nuxt/ui/dist/runtime/vue/stubs.js:3:22: ERROR: Could not resolve "#build/app.config"
at failureErrorWithLog (/Users/main/Documents/nuxt_project/node_modules/.pnpm/esbuild@0.25.2/node_modules/esbuild/lib/main.js:1477:15)
at /Users/main/Documents/nuxt_project/node_modules/.pnpm/esbuild@0.25.2/node_modules/esbuild/lib/main.js:946:25
at /Users/main/Documents/nuxt_project/node_modules/.pnpm/esbuild@0.25.2/node_modules/esbuild/lib/main.js:1355:9
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
ℹ 6:08:22 AM
[vue-tsc] Found 0 errors. Watching for file changes. |
@SoCuul You can use |
@benjamincanac just FYI - with tsc 3.0.0-alpha.2 and newest commit i dont get any errors anymore |
I can also confirm that! I managed to get this PR working Gwardia-Czapli/StoryPointsCasino#18 |
@simonmaass How did you install vue-tsc version 3.0.0-alpha.2 with the newest commit?
|
Vue TSC and newest commit of nuxt ui |
|
my package.json "dependencies": {
"@nuxt/image": "^1.10.0",
"@nuxt/scripts": "^0.11.5",
"@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@4d138ad",
"@nuxtjs/i18n": "9.4.0",
"@nuxtjs/seo": "^3.0.2",
"@pinia/nuxt": "^0.10.1",
"@tsndr/cloudflare-worker-jwt": "^3.1.4",
"@types/js-cookie": "^3.0.6",
"@types/lodash.isequal": "^4.5.8",
"@unhead/shared": "^2.0.3",
"@unhead/ssr": "^2.0.3",
"@vueuse/core": "^13.0.0",
"@vueuse/nuxt": "13.0.0",
"camelcase-keys": "^9.1.3",
"dotenv": "^16.4.7",
"embla-carousel-auto-height": "^8.5.2",
"embla-carousel-auto-scroll": "^8.5.2",
"embla-carousel-autoplay": "^8.5.2",
"embla-carousel-class-names": "^8.5.2",
"embla-carousel-fade": "^8.5.2",
"embla-carousel-vue": "^8.5.2",
"embla-carousel-wheel-gestures": "^8.0.1",
"graphql": "^16.10.0",
"graphql-request": "^7.1.2",
"html-entities": "^2.6.0",
"jose": "^6.0.10",
"lodash.isequal": "^4.5.0",
"maska": "^3.1.1",
"nuxt": "^3.16.2",
"oauth-1.0a": "2.2.6",
"ohash": "^2.0.11",
"pinia": "^3.0.1",
"reka-ui": "^2.2.0",
"sharp": "^0.33.5",
"tailwind-variants": "^1.0.0",
"vue": "latest",
"vue-router": "latest",
"zod": "^3.24.2"
},
"devDependencies": {
"@antfu/eslint-config": "^4.11.0",
"@commitlint/cli": "19.8.0",
"@commitlint/config-conventional": "19.8.0",
"@nuxt/test-utils": "^3.17.2",
"@vue/test-utils": "^2.4.6",
"eslint": "9.23.0",
"happy-dom": "^17.4.4",
"husky": "^9.1.7",
"playwright-core": "^1.51.1",
"ts-node": "^10.9.2",
"typescript": "^5.8.2",
"vite-plugin-graphql-loader": "^4.0.4",
"vitest": "^3.1.1",
"vue-tsc": "3.0.0-alpha.2"
},
"resolutions": {
"vue-tsc": "3.0.0-alpha.2"
} and I still have 44 errors: LOG
(edited by moderator for clarity) |
I might be wrong but as far as I understand the But keep in mind that I'm also working on the windows CI which introduces a new module-builder that also changes how types are generated and executed, this could help as well. PS: |
I confirm that alpha.2 fails silently. |
Sorry for not using collapsed sections. I’m running the following commands:
And I still get: |
For me, the newest vue-tsc version that worked was v2.0.24. |
Environment
Is this bug related to Nuxt or Vue?
Nuxt
Version
v3.0.0-alpha.13
Reproduction
not required
Description
run "npx nuxi typecheck"
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: