Closed thoriqadillah closed 3 months ago
Can't reproduce. Please provide a minimal reproduction.
Most likely you did not include the file in tsconfig
can you take a look at my project here? i tried to reproduce this issue with new project and it works perfectly fine. but not for that particular project @RayGuo-ergou @KazariEX @KermanX
Just bump all your deps to the latest version to ensure GlobalComponents
can be exported correctly from vue
.
my current deps version is already similar (latest) with the project i newly created. and what do you mean by this
to ensure GlobalComponents can be exported correctly from vue
Due to some issues between declare module '@vue/runtime-core'
and declare module 'vue'
in the old deps, the GlobalComponents
cannot be exported from vue
correctly, resulting in the component type being inferred as any
.
as @KazariEX mentioned, you just have to bump all your deps to the newest version (similar !== newest)
You probably did not declare vue global components but your libraries may do.
diff --git a/web/package.json b/web/package.json
index 55bd736..a7e890e 100644
--- a/web/package.json
+++ b/web/package.json
@@ -12,31 +12,32 @@
},
"dependencies": {
"@radix-icons/vue": "^1.0.0",
- "@vueuse/core": "^10.11.0",
- "axios": "^1.7.3",
+ "@vueuse/core": "^11.0.0",
+ "axios": "^1.7.4",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"non.geist": "^1.0.3",
- "pinia": "^2.1.7",
- "radix-vue": "^1.9.2",
- "tailwind-merge": "^2.4.0",
+ "pinia": "^2.2.2",
+ "radix-vue": "^1.9.4",
+ "tailwind-merge": "^2.5.2",
"tailwindcss-animate": "^1.0.7",
- "vue": "^3.4.29",
- "vue-router": "^4.3.3"
+ "vue": "^3.4.38",
+ "vue-router": "^4.4.3"
},
"devDependencies": {
"@iconify/vue": "^4.1.2",
"@tsconfig/node20": "^20.1.4",
- "@types/node": "^20.14.5",
- "@vitejs/plugin-vue": "^5.0.5",
+ "@types/node": "^20.15.0",
+ "@vitejs/plugin-vue": "^5.1.2",
"@vue/tsconfig": "^0.5.1",
- "autoprefixer": "^10.4.19",
- "npm-run-all2": "^6.2.0",
- "postcss": "^8.4.40",
- "tailwindcss": "^3.4.7",
- "typescript": "~5.4.0",
- "vite": "^5.3.1",
- "vite-plugin-vue-devtools": "^7.3.1",
- "vue-tsc": "^2.0.21"
- }
+ "autoprefixer": "^10.4.20",
+ "npm-run-all2": "^6.2.2",
+ "postcss": "^8.4.41",
+ "tailwindcss": "^3.4.10",
+ "typescript": "~5.5.4",
+ "vite": "^5.4.1",
+ "vite-plugin-vue-devtools": "^7.3.8",
+ "vue-tsc": "^2.0.29"
+ },
+ "packageManager": "pnpm@9.7.1"
}
Just a kind suggestion, if someone gave you a suggestion and if it's not that hard to do. Please try first rather than just "guess" :).
bump the version indeed fix the issue. thanks. sorry, i thought that bumping the version == make the version similar to the newly created project. i wasn't aware of that. thanks for the help
Vue - Official extension or vue-tsc version
2.0.28
VSCode version
1.91.1
Vue version
^3.4.29
TypeScript version
~5.4.0
System Info
Steps to reproduce
I use shadcn-vue for my component because im to lazy to create one.
What is expected?
there should be props suggestion like what is the available props for this component
What is actually happening?
there is no props suggestion. preview:
Link to minimal reproduction
No response
Any additional comments?
No response