-
Notifications
You must be signed in to change notification settings - Fork 33
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
[@sanity/client] running a script with Bun gets the process hanged. #714
Comments
Interesting. I got it working in an earlier version of bun ( |
Interesting take @bjoerge . I tested each version and it stopped working on v1.1.0. I'll add this comment there |
Looks like it could be related to this: oven-sh/bun#7260 |
Hi, we tried adding It created different problems:
Surprisingly, changing the bun import conditions to point to the transport that uses It's surprising because the assumption has been that Here's the basic e2e test we're using: The CI tests on Bun 1.1.3, and I've also run the same test locally with Bun 1.1.3 and it works there too. Give https://github.com/sanity-io/client/releases/tag/v6.15.13 and tell us if that works for you 🙌 |
Checking the test rig, it started happening last week:
Last passing test: https://github.com/sanity-io/client-runtimes-compatibility/actions/runs/8502608803/job/23287010458
Based on this, and the error on the CLI that started happening with Bun 1.1.0 seems to be it started using the node version of Here's how you can check what transport is in use: import {unstable__adapter, unstable__environment} from '@sanity/client'
import {adapter, environment} from 'get-it'
console.log({unstable__adapter, unstable__environment, adapter, environment}) In bun prior to 1.1.0 In any case that shouldn't be a problem anymore as we now tell Bun exactly what version to use |
Closing as it should be fixed as of @sanity/[email protected] |
Really nice. Thank you for fixing this 🙌 |
If you find a security vulnerability, do NOT open an issue. Email [email protected] instead.
Describe the bug
Running a simple script using the
@sanity/client
with bun gets the process hanging forever. This doesn't work withtsx
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Works with bun without problems
Screenshots
CleanShot.2024-04-10.at.07.03.28.mp4
Which versions of Sanity are you using?
Run
sanity versions
in the terminal and copy-paste the result here.What operating system are you using?
Which versions of Node.js / npm are you running?
Additional context
Since this is an integration problem, I opened the same problem in Bun. Maybe they need to fix something in their side:
oven-sh/bun#10138
The text was updated successfully, but these errors were encountered: