-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fetch in node-appwrite not working using bun #12320
Comments
I found it's similar as #3386, #3371, but maybe not the same exactly. And the implementation of node-appwrite use See also #10642, #10834, nodejs/node#48977, https://stackoverflow.com/questions/73817412/why-is-the-agent-option-not-available-in-node-native-fetch, https://bun.sh/docs/runtime/nodejs-apis#node-https. |
I found that I can skip this unexpected no-message crash if I comment the following two lines of code in https://github.com/appwrite/sdk-for-node/blob/main/src/client.ts. // import { createAgent } from 'node-fetch-native-with-agent/agent'; // line 2
// ...createAgent(this.config.endpoint, { rejectUnauthorized: !this.config.selfSigned }), // line 228 https://github.com/appwrite/sdk-for-node/blob/8113032344a3f29cfd7947cabc14066c7be33320/src/client.ts#L2 The first import |
What version of Bun is running?
1.1.17
What platform is your computer?
Microsoft Windows [Version 10.0.22631.3810]
What steps can reproduce the bug?
main.ts
code using the latest bun viabun main.ts
.What is the expected behavior?
working as expected.
What do you see instead?
just exited when invoke the
response = await fetch(uri, options);
in node-appwrite.Additional information
I added some console.info in the implementation of
databases.listDocuments
. And the same code works using node.The text was updated successfully, but these errors were encountered: