-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use built-in FormData
instead of form-data
library
#96
Comments
Hi @michaelhays, |
Thanks! We are going to plan doing this. |
Hi @michaelhays, we're already using
|
Hi @mhagmajer, the problem on my end is actually the very next line:
The Could you please re-open this issue? The only way I'm able to use this library right now is by patching it to remove the call to |
You can keep this closed in favor of #213, since I finally figured out the root issue. |
Hey there, I'm trying to upload a file with
client.uploads.uploadFile()
, and am seeing the error:The error happens when calling
eval('require')('form-data')
here.This is the same issue that I ran into with #54, so it seems that the
eval('require')('<library>')
approach still breaks with my configuration for some reason, whether that's due to Vercel, ESM vs CJS, or something else. (Note that I tried installingform-data
to mypackage.json
, to no avail.)It's probably wise to figure out what is going on at the root here, but I think a good immediate solution would be to drop the
form-data
library in favor of just using theFormData
that has been built-in to Node.js since v18.This would require dropping support for Node.js 16, but that has been end-of-life since September 2023, so this seems like a reasonable time to do so. Plus, Node.js 16 could still work with the
--experimental-fetch
flag.There are some other good reasons to drop
form-data
laid out in this issue: form-data/form-data#537What do you think?
The text was updated successfully, but these errors were encountered: