Undici.getGlobalDispatcher() is undefined
What version of Bun is running?
1.0.7+b0393fba6200d8573f3433fb0af258a0e33ac157
What platform is your computer?
Linux 5.15.133.1-microsoft-standard-WSL2 x86_64 x86_64
What steps can reproduce the bug?
call getGlobalDispatcher() from "undici" package
What is the expected behavior?
the function exists in the packages source code, so it shouldnt say undefined.
What do you see instead?
usage of undici in discord.js REST
Additional information
Heard that "undici" is overridden by Bun implementation.
Bun version: 1.0.25 (a8ff7be6) Same issue, is it solved?
Bun v1.1.5
Same issue.
Bun v1.1.13
SyntaxError: Export named 'getGlobalDispatcher' not found in module 'undici'.
Yeah just came to try bun on a few of my projects, 1.1.20 here
❯ bun run lib/index.ts
1 | (function (entry, fetcher)
^
SyntaxError: Export named 'getGlobalDispatcher' not found in module 'undici'.
I also have this problem, it prevents me from being able to run Miniflare on Bun. Bun version is 1.1.34
1 | import undici from "undici";
2 |
3 | const dispatcher = undici.getGlobalDispatcher();
^
TypeError: undici.getGlobalDispatcher is not a function. (In 'undici.getGlobalDispatcher()', 'undici.getGlobalDispatcher' is undefined)