stackblitz / webcontainer-core

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

Gatsby develop does not work #834

Open janpio opened 2 years ago

janpio commented 2 years ago

Describe the bug

https://developer.stackblitz.com/codeflow/integrating-web-publisher#_1-repo-compatibility-check

Our docs repository uses Gatsby, and when running gatsby develop (or npm run dev in our case), nothing happens in Stackblitz but a white flash at the bottom left.

Link to the blitz that caused the error

https://stackblitz.com/~/github.com/prisma/docs

Steps to reproduce

  1. Open blitz
  2. wait
  3. If you miss it, run npm run dev or gatsby develop manually

Expected behavior

Gatsby can build and browser window with preview opens

Parity with Local

Screenshots

No response

Platform

Version = 1.67.0
Hash = 781d7336116100a3cea72283913b570818ac125e
WebContainer = ea2f6b48b77806aba8e6fe3b6311530cc7674f64

Browser name  = Chrome
Full version  = 105.0.0.0
Major version = 105
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 162869781,
  "usedJSHeapSize": 154861905,
  "jsHeapSizeLimit": 4294705152
}

Additional context

No response

Nemikolh commented 1 year ago

Hi @janpio! :wave:

It seems that this project uses private packages (@fortawesome/pro-regular-svg-icons@6.3.0 and @fortawesome/pro-solid-svg-icons@6.3.0). Private packages are not supported just yet :wink:

Nemikolh commented 1 year ago

Looks like I might have been a bit too quick. I missed that you said:

when running gatsby develop (or npm run dev in our case), nothing happens in Stackblitz but a white flash at the bottom left.
janpio commented 1 year ago

Yeah, the private packages are a new thing. I should have linked to a specific commit back then for this to be reproducible :/

Nemikolh commented 1 year ago

No worries! If you are aware of a branch or commit that would allow me to reproduce this issue it would be much appreciated. 😊

janpio commented 1 year ago

This would be a commit from around that time: https://github.com/prisma/docs/commit/e24f0b74aea7d24678def8e4250bdc8bff412008

So:

  1. https://stackblitz.com/~/github.com/prisma/docs
  2. git fetch
  3. git checkout e24f0b74aea7d24678def8e4250bdc8bff412008
  4. npm run dev
  5. Nothing happens.

The white flash I described only happens sometimes now (and might also have back then). It overlays the branch and error+warnings footer in the editor.

This is the output you get:

~/prisma/docs
❯ npm run dev
$ gatsby develop

Vs. how what you should get starts on Gitpod for example:

gitpod /workspace/docs ((e24f0b74...)) $ npm run dev

> prisma2-docs@1.0.0 dev /workspace/docs
> gatsby develop

╔════════════════════════════════════════════════════════════════════════╗
║                                                                        ║
║   Gatsby collects anonymous usage analytics                            ║
║   to help improve Gatsby for all users.                                ║
║                                                                        ║
║   If you'd like to opt-out, you can use `gatsby telemetry --disable`   ║
║   To learn more, checkout https://gatsby.dev/telemetry                 ║
║                                                                        ║
╚════════════════════════════════════════════════════════════════════════╝
success compile gatsby files - 1.899s
success load gatsby config - 0.068s
success load plugins - 1.023s
warn gatsby-plugin-react-helmet: Gatsby now has built-in support for modifying the document head. Learn more at https://gatsby.dev/gatsby-head
success onPreInit - 0.008s
success initialize cache - 0.051s
success copy gatsby files - 0.143s
success Compiling Gatsby Functions - 0.255s
success onPreBootstrap - 0.288s
success createSchemaCustomization - 0.045s
...