Skip to content

[Bug]: npx shadcn-vue@latest add chart-bar fails with invalid JSON response from URL #1352

@sazzadh88

Description

@sazzadh88

Reproduction

Run npx shadcn-vue@latest add chart-bar in a Vue project

Describe the bug

Running npx shadcn-vue@latest add chart-bar fails with a JSON parsing error.

It tries to fetch https://shadcn-vue.com/r/styles/new-york-v4/chart-bar.json, but receives an HTML response instead of JSON:

It appears that the component chart-bar is missing from the registry or the URL is incorrect.

System Info

System:
    OS: macOS 15.4.1
    CPU: (8) arm64 Apple M2
    Memory: 104.58 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Yarn: 1.22.22 - ~/Library/Application Support/Herd/config/nvm/versions/node/v20.17.0/bin/yarn
    npm: 11.2.0 - ~/Library/Application Support/Herd/config/nvm/versions/node/v20.17.0/bin/npm
  Browsers:
    Brave Browser: 138.1.80.122
    Chrome: 138.0.7204.169
    Safari: 18.4
  npmPackages:
    @vueuse/core: ^12.8.2 => 12.8.2 
    reka-ui: ^2.4.0 => 2.4.0 
    vue: ^3.5.13 => 3.5.16

Contributes

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions