shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
74.77k stars 4.65k forks source link

[bug]: fetch() URL is invalid #5806

Open aamirv1 opened 6 days ago

aamirv1 commented 6 days ago

Describe the bug

I am getting the below error when I am initializing shadcn or adding new component Tried with bun (bunx) and pnpm too

✔ Preflight checks.
✔ Verifying framework. Found Next.js.
✔ Validating Tailwind CSS.
✔ Validating import alias.

Something went wrong. Please check the error below for more details.
If the problem persists, please open an issue on GitHub.

fetch() URL is invalid

Affected component/components

CLI

How to reproduce

In New project:

  1. Initialize shadcn with the following command : bunx --bun shadcn@latest init In this case I get the following error:
    ⠧ Creating a new Next.js project. This may take a few minutes.
    Something went wrong creating a new Next.js project. Please try again.

    image

When adding new component:

  1. Run the add component command : bunx --bun shadcn@latest add context-menu Here I am getting the following error:
    
    ⠋ Checking registry.

Something went wrong. Please check the error below for more details. If the problem persists, please open an issue on GitHub.

fetch() URL is invalid

![image](https://github.com/user-attachments/assets/ee39226e-228c-41c5-b47d-0458ad101312)

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Linux Mint 21.3 Virginia
Cinnamon 6.0.4
Kernel: 5.15.0-125-generic x86_64

PM / Runtime - Bun 1.1.34
PNPM - 9.12.3

Before submitting

Japesh05 commented 2 days ago

I have tried with bun, it is not working, although when i tried using the pnpm it works for me. I found this, you can try this but this also does not worked for me - https://github.com/shadcn-ui/ui/issues/3090.

I am using windows.

aamirv1 commented 2 days ago

@Japesh05 No luck for me, with bun, pnpm and even npm. Thanks for the suggestion though.