You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected Behavior
I expect it to run, and print the name of my file. The file exists in the path, and is accessible to the app (the node JS app finds it and has access to it; moreover, if I use a non-existent file, I get a 409 error, and I don't in this case).
Actual Behavior
I get an error, like this:
62 | if ((0, _utils.isWindowOrWorker)()) {
63 | res.blob().then(function (data) {
64 | return resolve(data);
65 | });
66 | } else {
67 | res.buffer().then(function (data) {
^
TypeError: res.buffer is not a function. (In 'res.buffer()', 'res.buffer' is undefined)
at /project/node_modules/dropbox/cjs/src/response.js:67:7
at new Promise (:1:21)
at parseDownloadResponse (/project/node_modules/dropbox/cjs/src/response.js:61:10)
at /project/node_modules/dropbox/cjs/src/dropbox.js:146:20
Screenshots
N/A
Versions
What version of the SDK are you using? 10.34.0
What version of the language are you using? Whatever Bun's using
Are you using Javascript or Typescript? TypeScript
What platform are you using? (if applicable) Bun 1.0.30
Additional context
None.
The text was updated successfully, but these errors were encountered:
I think I've figured it out. It seems that Bun's fetch has a different API than node-fetch; However, it still seems to make sense to fix this problem, so I hope it'll remain open.
To locally fix it (for me it worked at least) :
Install node-fetch: bun install --save-dev node-fetch
Use node-fetch instead of Bun's fetch, meaning add an import fetch from "node-fetch", which should sort it out for the example I offered in the original post.
Describe the bug
I am migrating my web app to bun, and it seems the dropbox SDK usage fails to download files.
To Reproduce
bun install --save-dev dropbox
bun dropbox.ts
Expected Behavior
I expect it to run, and print the name of my file. The file exists in the path, and is accessible to the app (the node JS app finds it and has access to it; moreover, if I use a non-existent file, I get a 409 error, and I don't in this case).
Actual Behavior
I get an error, like this:
Screenshots
N/A
Versions
Additional context
None.
The text was updated successfully, but these errors were encountered: