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

Support Bun runtime #4282

Open
cfragkos opened this issue Jan 16, 2024 · 6 comments
Open

Support Bun runtime #4282

cfragkos opened this issue Jan 16, 2024 · 6 comments

Comments

@cfragkos
Copy link

What do you want and why?

Now that Bun is stable, and next supports it maybe it is time to implement support for Blitz.

@flybayer
Copy link
Member

My understanding is that all Node stuff should just work in Bun, right? Nothing special needed for us?

@cfragkos
Copy link
Author

For the package manager yes, for the runtime i think there are need some changes. I did try to run it and it did not work, there was some runtime error in @blitz/auth

@siddhsuresh
Copy link
Member

siddhsuresh commented Jan 23, 2024

@cfragkos I just took a look, I see that blitz.js + next pages is working without any noticeable issues on bunjs runtime. Do you have any particular issue / errors you faced that affected blitz alone?

AFAIK The app directory is not working with bun yet, so there is nothing we can do to support it.

@cfragkos
Copy link
Author

Did you run it with bun as a package manager or as runtime as well (bun --bun run dev)?

@siddhsuresh
Copy link
Member

siddhsuresh commented Jan 23, 2024

both, and as a run time through bun --bun blitz dev. It would be nice to have some reproduction repos or error logs to debug individual issues.
(only pages router)

@cfragkos
Copy link
Author

cfragkos commented Jan 23, 2024

So this is a very weird error display. The way it is shown I am not sure if it is related to sentry or blitz but here you go

BTW Page does render normally, but I did not go in depth of checking that everything works fine.

 ○ Compiling / ...
 ✓ Compiled / in 18.5s (4679 modules)
294 |     }
295 |   }
296 | };
297 | const authorizeRole = (role, currentRole) => {
298 |   if (role && currentRole) {
299 |     if (Array.isArray(role)) {
                                  ^
error: Rendering Suspense fallback...
      at /home/kfragkos/HealthierDoctor/node_modules/@blitzjs/auth/dist/chunks/index.cjs:299:29

 GET / 200 in 20310ms
Failed to proxy https://o479330.ingest.sentry.io/api/4506309548572672/envelope/?o=479330&p=4506309548572672&hsts=0 ConnectionClosed: The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()
 path: "http://o479330.ingest.sentry.io:443/api/4506309548572672/envelope/?o=479330&p=4506309548572672&hsts=0"

ConnectionClosed: The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()
 path: "http://o479330.ingest.sentry.io:443/api/4506309548572672/envelope/?o=479330&p=4506309548572672&hsts=0"

My bun blitz -v

Blitz version: 2.0.3 (local)
Linux 5.15 | linux-x64 | Node: v20.11.0


 Package manager: pnpm

  System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (24) x64 AMD Ryzen 9 7900X 12-Core Processor
    Memory: 10.76 GB / 15.19 GB
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: Not Found
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
  npmPackages:
    @blitzjs/auth: 2.0.3 => 2.0.3 
    @blitzjs/next: 2.0.3 => 2.0.3 
    @blitzjs/rpc: 2.0.3 => 2.0.3 
    @prisma/client: ^5.8.1 => 5.8.1 
    blitz: 2.0.3 => 2.0.3 
    next: ^14.1.0 => 14.1.0 
    prisma: ^5.8.1 => 5.8.1 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    typescript: 5.3.3 => 5.3.3 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants