stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.89k stars 161 forks source link

Booting Web container not loading. #1507

Open aznboi-git opened 1 month ago

aznboi-git commented 1 month ago

Describe the bug

Im on StackBlitz and the booting web container is just frozen. (Dont mind my code, I am just a beginner.)

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-olaw28?file=page2.html

Steps to reproduce

s

Expected behavior

I was expecting to see my website loaded in.

Parity with Local

Screenshots

No response

Platform

Browser name  = Chrome
Full version  = 128.0.0.0
Major version = 128
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 83676045,
  "usedJSHeapSize": 76120153,
  "jsHeapSizeLimit": 2003042304
}
Hash = 216f7361

Additional context

No response

Nemikolh commented 1 month ago

Hey @aznboi-git! Looks like your project does not contains any http server. In order to see the content of your site in the preview, it needs to be served by a local HTTP server.

If you're not going to have any logic server side, I'd recommend keeping a package.json with the following content at a minimum:

{
  "scripts": {
    "start": "servor --reload"
  },
  "dependencies": {
    "servor": "^4.0.2"
  }
}

Then after refreshing the page, it should work. See this example: https://stackblitz.com/edit/stackblitz-starters-qaomey