unovue / shadcn-vue

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

[Bug]: on bun x shadcn-vue@latest add button error did not recognize object of type "TSInterfaceHeritage" #905

Closed jeydi243 closed 1 week ago

jeydi243 commented 1 week ago

Reproduction

https://github.com/jeydi243/hasi

Describe the bug

I Initialize a new nuxt app ( bun x nuxi@latest init hasi) and follow procedure to add shacn-vue for nuxt project documentation when i try to add component Button the error appear. image I have tried also to run :

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 513.63 MB / 15.73 GB
  Binaries:
    Node: 18.18.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
    npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.15.6 - C:\Program Files\nodejs\pnpm.CMD
    bun: 1.1.34 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (127.0.2651.105)
    Internet Explorer: 11.0.22621.3527

Contributes

GabrielFrohlich commented 1 week ago

it happens here too

ManukMinasyan commented 1 week ago

It occurs here as well.

catnaut commented 1 week ago

node.js v20 + pnpm as well

Vertirax commented 1 week ago

It looks like v0.11.0 has the same issue. (I was able to add components using 0.10.5 though)

webceoboy commented 1 week ago

+1

aphofstede commented 1 week ago

So far it's only button that has this issue for me.

Workaround: bun x shadcn-vue@0.10 add button

TheBatman09 commented 1 week ago

I also had this issue when trying to use several components, for now I did like @aphofstede and target a lower version : npx shadcn-vue@0.10.5 add sidebar

Chaplink commented 1 week ago

I also encountered the same problem in the project with pnpm. Another way of thinking is to load tabs successfully.

pauljaspersahr commented 1 week ago
node ➜ /project/app npx shadcn-vue@latest add sidebar
⠸ Installing sidebar...
 ERROR  did not recognize object of type "TSInterfaceHeritage" 

Just got the same issue with sidebar.

I am running in it devcontainer with

    "image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm",
Soviut commented 1 week ago

I got the same issue when installing the Sidebar component. While the Vue components all were created, it seems to not write the index.ts file when it occurs.

Like others have mentioned using a lower version of the CLI worked.

npx shadcn-vue@0.10 add sidebar
mdthansil commented 1 week ago

I encountered the same problem with the Button and Sidebar: "did not recognize object of type 'TSInterfaceHeritage'." I was able to resolve the issue by changing the version like this: npx shadcn-vue@0.10 add button npx shadcn-vue@0.10 add sidebar

leochiu-a commented 1 week ago

The issue appears to be caused by vue-metamorph@3.2.2. After downgrading vue-metamorph to version 3.2.0, everything works fine.