-
Notifications
You must be signed in to change notification settings - Fork 2
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: this.agent.request is not a function #28
Comments
Can you check your package.lock file to see which version of the |
Using bun, but here's what bun.lockb has:
|
Got it. The SDK definitely works in node, but I was able to reproduce the issue in bun. It looks like bun is trying to polyfill undici in their environment, but it only has partial support. For example, they implemented undici.request in oven-sh/bun#2136 but only on the module level, not on the Agent/Dispatcher. The reason we use I'm guessing that bun's fetch implementation is just a lot better than node's. This issue boils down to just using fetch in non-node environments #20 |
By the way, the official stance of bun is to be compatible directly with node https://twitter.com/jarredsumner/status/1700497869160268155 It looks like other libraries are using undici.Pool.request, which is also unimplemented NomicFoundation/hardhat#4383 oven-sh/bun#7920, and it's an open issue to fix in bun. But we will work around it in the turbopuffer client anyway, as we want to support all JS environments, not just node. |
Hello I am getting this error when using the Typescript SDK, full error below
Details:
The text was updated successfully, but these errors were encountered: