unovue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
4.9k stars 280 forks source link

[Bug]: Cannot find module 'radix-vue' or its corresponding type declarations #215

Closed devberkay closed 10 months ago

devberkay commented 10 months ago

Environment

"nuxt": "^3.8.2",
"shadcn-nuxt": "^0.1.0",
"typescript": "^5.3.3",
"vue": "^3.3.12",
"radix-vue": "^1.2.5"

Link to minimal reproduction

No need since folder/linter issue

Steps to reproduce

Install radix-vue and shadcn-vue following instructions Download any component using command line ( I have used Button) import { Primitive, type PrimitiveProps } from 'radix-vue' line gives error:

[Bug]: Cannot find module 'radix-vue' or its corresponding type declarations

Describe the bug

"nuxt": "^3.8.2", "shadcn-nuxt": "^0.1.0", "typescript": "^5.3.3", "vue": "^3.3.12", "radix-vue": "^1.2.5",

Download any component using command line ( I have used Button)

Component script section gives the following error: Cannot find module 'radix-vue' or its corresponding type declarations.

Expected behavior

No response

Conext & Screenshots (if applicable)

No response

devberkay commented 10 months ago

Bug has been fixed when i restarted VS Code.

sadeghbarati commented 10 months ago

in VSCode install these two extensions

  1. https://marketplace.visualstudio.com/items?itemName=Vue.volar
  2. https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin
  3. Disable built-in VSCode TypeScript extensions

For Volar 2 (not released yet) step 3 is redundant I think xd


This is nice extension too

https://marketplace.visualstudio.com/items?itemName=YuTengjing.reload-can-solve-any-problems