codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.02k stars 2.27k forks source link

Gatsby Starter Default ports problem #7145

Open rhernandog opened 1 year ago

rhernandog commented 1 year ago

🐛 bug report

Preflight Checklist

Description of the problem

When I create a new gatsby-starter-default (Gatsby's version 5.0.0) after installing another package (GSAP) and fiddling a bit with it the port gets closed and never opens again. Also I get this error in the terminal: error Gatsby requires Node.js 18.0.0 or higher (you have v14.19.3).

How has this issue affected you? What are you trying to accomplish?

I'm from the GreenSock team, and we're setting up some Get Started examples in various frameworks so users can fork them and post their issues in the GreenSock forums, so basically this doesn't allow us to create such examples. We don't want to rely on the current beta Gatsby template (which actually works great and uses a different version of Gatsby), since it requires being authenticated with GitHub and we don't want to force users to do that.

To Reproduce

Create a new Gatsby Starter Default (not beta) and start adding, removing stuff, like a new page, or content on an existing page. At some point the port will close and will never open again. You'll see a 502 Bad Gateway warning in the preview.

Link to sandbox: link (optional)

Your Environment

Software Name/Version
Сodesandbox
Browser Chrome and Firerfox
Operating System Ubuntu 22 LTS
tristandubbeld commented 1 year ago

Hi @rhernandog, thanks for raising this issue! Gatsby v5 does indeed require node 18, but this isn't supported in the sandboxes yet. It's on our list, so we will soon start working on it. When it's available you're able to change it in the sandbox configuration file. For now, is it possible for you to downgrade Gatsby in the sandboxes so it's not relying on node 18?

We don't want to rely on the current beta Gatsby template [...] since it requires being authenticated with GitHub and we don't want to force users to do that.

From my understanding the current non-beta Gatsby template also requires users to log in when forking:

We execute Gatsby sandboxes in a server container. This is still in beta, so we require you to sign in before you can fork a Gatsby sandbox.

Please let us know if you have any further questions or remarks!