stackblitz / bolt.new

Prompt, run, edit, and deploy full-stack web applications
https://bolt.new
MIT License
8.16k stars 3.05k forks source link

Expo Project #179

Open codercatdev opened 1 month ago

codercatdev commented 1 month ago

Describe the bug

I tried converting a bunch of components running in the standard Vite React to Expo and running the project.

I received this back FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: socket hang up

> expo start

Starting project at /home/project

TypeScript: A tsconfig.json has been auto-generated

Unable to reach Expo servers. Falling back to using the cached dependency map (bundledNativeModules.json) from the package "expo" installed in your project.
FetchError: request to https://api.expo.dev/v2/versions/latest failed, reason: socket hang up

Link to the Bolt URL that caused the error

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

Steps to reproduce

Create an application then convert to expo and run start

Expected behavior

Expected to be able to run successfully.

Screen Recording / Screenshot

No response

Platform

Additional context

No response

kirjavascript commented 1 month ago

Hey @codercatdev!

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

We do have a CORS proxy on StackBlitz, but I believe it hasn't been ported over the WebContainer API / Bolt yet. I've added this to our internal issue tracker.

jirojirocirociro commented 1 month ago

Hey @codercatdev!

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

We do have a CORS proxy on StackBlitz, but I believe it hasn't been ported over the WebContainer API / Bolt yet. I've added this to our internal issue tracker.

please fix.

asssmidt commented 1 day ago

Hey @codercatdev!

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

We do have a CORS proxy on StackBlitz, but I believe it hasn't been ported over the WebContainer API / Bolt yet. I've added this to our internal issue tracker.

Any update on this?

Trying to get around Cors issue with Bolt.new. Seems impossible?

VortexxJS commented 21 hours ago

yeah getting this issue too when installing prisma.