stackblitz / webcontainer-core

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

Won't load the right package.json #389

Closed eric-burel closed 1 year ago

eric-burel commented 3 years ago

Describe the bug

When forking an existing Next.js repo (the Vulcan Next framework https://github.com/VulcanJS/vulcan-next), I cannot install the packages. From the terminal, it seems that the package.json I get is the Node.js defaults one.

Link to the blitz that caused the error

https://stackblitz.com/edit/node-aqk3t6

Steps to reproduce

Run yarn install or cat package.json, you won't have the right dependencies.

Expected behavior

Try to install the right dependency.

I am not sure my project will run on StackBlitz as is but at least I'd like to go one step further and try the actual installation process.

Screenshots

No response

Platform

Browser name  = Chrome 
Full version  = 95.0.4638.54
Major version = 95
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 140854069,
  "usedJSHeapSize": 115986769,
  "jsHeapSizeLimit": 4294705152
}
Hash = d83b9b15484f32317787d8c7cc41da5651102bdc

Additional context

If you have some kind of program to provide more support for open source projects that want to run on StackBlitz it would be awesome, we also need to plug Mongo and few other stuffs :pray:

SamVerschueren commented 3 years ago

@eric-burel Thanks for reporting. What URL did you use to fork vulcan-next into StackBlitz? The project seems to be huge. Also, the provided URL doesn't contain the project.

eric-burel commented 3 years ago

It loads the project if you wait enough, maybe that's part of the bug. Here's a screenshot just in case, you see it loading: image

I use this fork: https://github.com/eric-burel/vulcan-next And the official project lives there: https://github.com/VulcanJS/vulcan-next

I used the fork in this example because StackBlitz doesn't yet support loading a project with only a main branch and I did not want to add a master to the main repo, in the future I'll use only the "VulcanJS/vulcan-next" official repo.

Yeah that's a huge project :) We build a full-stack starter for Next.js and GraphQL. But under the hood it's just a Next app, the rest is tooling. If Mongo cannot be supported I might give a shot to a full Node in-memory alternative, there are some built for testing and prototyping.

SamVerschueren commented 1 year ago

@eric-burel A while back we had issues when using the github integration. Basically when connecting a repository to StackBlitz, broke editing files. This should be fixed in the mean time (I confirmed this for smaller projects). So I'm wondering if that was the issue here as well.

Would you be able to test it again and see if it works now for you?

jrvidal commented 1 year ago

:wave: We're closing this due to inactivity. Please, feel free to open a new one if you're still encountering any errors.