-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error running bun nextjs app in docker #4671
Comments
@abhi12299 Try running again. It added necessary types to make it typescript worthy. It should work the next time |
Got the same problem with Nuxt. |
Observations: Next.js spawns workers to handle routing etc. I have created two projects with app router and pages router When we run the projects locally, they work fine. But when run in Docker they fail with the same error: So the possible options to get this result:
@peterhijma Most probably the same issue with Nuxt |
@karthik-js I also got quite similiar issue with you. I still can't run my nextjs app with bun run dev. |
@ericklarsen not sure if that is same issue. It shows in ur error that it is a dom exception. If you can share a repro repo. I will try to debug and help you |
Getting in docker:
|
Issue is already being tracked by the bun team here: #3776 |
@karthik-js I think that the issue you're referencing is different from this one. Here it fails inside of docker, works well without it. |
Check the 3rd point where he mentions worker threads. It was added to the bun. Now Next.js companion PR has to be merged and needs to be released. |
It's not only about Next, seems to be more general |
I noticed a similar thing when I used bun only as a docker image for an app that uses npm as a package manager. I wasn't able to build it inside a docker container.
|
@landsman same here |
1 similar comment
@landsman same here |
I also got the same error when building with nextjs. My console log also shows the same error. I wonder if you have found any solution |
What version of Bun is running?
1.0.0
What platform is your computer?
Darwin 22.6.0 arm64 arm
What steps can reproduce the bug?
Run
bunx create-next-app
command to initialise a new nextjs app.Add the following
Dockerfile
to the project:docker build -t bunnext:latest .
What is the expected behavior?
The container should keep running and the web app should load successfully.
What do you see instead?
No response
Additional information
bun run dev
command works fine outside of Docker.The text was updated successfully, but these errors were encountered: