Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installing code from v0 is not working with shadcn add #40

Open
TimPietrusky opened this issue Oct 4, 2024 · 1 comment
Open

installing code from v0 is not working with shadcn add #40

TimPietrusky opened this issue Oct 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@TimPietrusky
Copy link

Describe the bug

When telling bolt to run npx shadcn add "https://v0.dev/chat/b/<id>", it will fail with this error: request to [https://v0.dev/chat/b/](https://t.co/TE5EKUYAZF)<id>/json failed, reason: socket hang up

Link to the Bolt URL that caused the error

https://bolt.new/~/sb1-esspt2

Steps to reproduce

  1. Execute the prompt: "create a next, react, shadcn project and run this command: npx shadcn add "https://v0.dev/chat/b/<id>""
  2. See in the terminal, that the error is triggered

Expected behavior

I can just install any blocks from v0.

Screen Recording / Screenshot

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 129

Additional context

https://x.com/stackblitz/status/1842336979939422604

@Nemikolh Nemikolh added the bug Something isn't working label Oct 7, 2024
@Nemikolh
Copy link
Member

Nemikolh commented Oct 7, 2024

Hey @TimPietrusky!

Ah, I think this is because it's running into a CORS issue. It would work if https://v0.dev/chat/b/<id> was served with Access-Control-Allow-Origin set to * or if returned the origin which sent the request, returning something like https://<unique>.w-credentialless-staticblitz.com/.

We do have a CORS proxy though on StackBlitz, but I believe it hasn't been ported over the WebContainer API yet.

GQAdonis pushed a commit to tribe-health/bolt.new-extended that referenced this issue Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants