Skip to content
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

turborepo next not working with bun #9869

Open
darklight9811 opened this issue Apr 3, 2024 · 5 comments
Open

turborepo next not working with bun #9869

darklight9811 opened this issue Apr 3, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@darklight9811
Copy link

darklight9811 commented Apr 3, 2024

What version of Bun is running?

1.1.0-canary.58+83a99bf19

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

Use the repo:

https://github.com/darklight9811/reencontre-me/tree/bun

Run bun install and them bun --bun run dev --scope=app

What is the expected behavior?

For the code to run the server and start it

What do you see instead?

A bunch of errors are thrown in the terminal (its trying to log something), but finally throws a:

app:dev: error: Attempt to export a nullable value for "TextDecoderStream"
app:dev: 
app:dev:       at defineProperties (C:\projects\javascript\yamiassu\company\reencontre-me\node_modules\next\dist\compiled\edge-runtime\index.js:1:711758)
app:dev:       at addPrimitives (C:\projects\javascript\yamiassu\company\reencontre-me\node_modules\next\dist\compiled\edge-runtime\index.js:1:710442)
app:dev:       at extend (C:\projects\javascript\yamiassu\company\reencontre-me\node_modules\next\dist\compiled\edge-runtime\index.js:1:705225)
app:dev:       at new VM (C:\projects\javascript\yamiassu\company\reencontre-me\node_modules\next\dist\compiled\edge-runtime\index.js:1:712552)
app:dev:       at new EdgeVM (C:\projects\javascript\yamiassu\company\reencontre-me\node_modules\next\dist\compiled\edge-runtime\index.js:1:705155)
app:dev:       at C:\projects\javascript\yamiassu\company\reencontre-me\node_modules\next\dist\server\web\sandbox\context.js:208:38

Additional information

This is a opensource project for an app that helps find missing people and pets

@darklight9811 darklight9811 added the bug Something isn't working label Apr 3, 2024
@wesleycoder
Copy link

I've run in the same issue when trying go use Next.js with Bun in a Docker container for deploy with fly.io in a monorepo setup.

I'll try to isolate a reproduction repository with my use-case w/ Docker.

@darklight9811
Copy link
Author

@wesleycoder I don't know if its the same case as you, but bun 1.1.17 fixed it for me. It was an issue with bun install, if I installed everything with node, it would work when running bun.

I will close it for now since the bug I reported was fixed

@darklight9811
Copy link
Author

Actually the error just reappeared out of nowhere, but a solution for me is to install using yarn and just run dev with bun

@darklight9811 darklight9811 reopened this Jun 27, 2024
@darklight9811
Copy link
Author

related

@wesleycoder
Copy link

wesleycoder commented Jul 6, 2024

I managed to fix my issue with the help of turborepo, running the prune command with the --docker flag was enough to mitigate most of the problems for me.

For me prune fits because I was building only a subset of the monorepo, but this may not apply to everyone.

Maybe you can try prune and see if it helps you, although it seems this occurs in dev mode for you, while for me was only at prod/build time:
https://turbo.build/repo/docs/reference/prune

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants