sendgrid / sendgrid-nodejs

The Official Twilio SendGrid Led, Community Driven Node.js API Library
https://sendgrid.com
MIT License
3k stars 782 forks source link

fix(client): use ".default" named export when importing axios #1407

Open tusharf5 opened 3 months ago

tusharf5 commented 3 months ago

Using this package with the latest axios with webpack results in an error, using a .default import which is officially supported by axios fixes that issue.

For more context, we are using sendgrid heavily at our org (tens of millions of emails per month) and upgrading to axios > 0 broke sendgrid and we narrowed it down to the import statement that's changed in this PR.

Checklist

If you have questions, please file a support ticket.

naeemdadi-kunai commented 2 months ago

+1

naeemdadi-kunai commented 2 months ago

Hey @tusharf5, thanks for this. Meanwhile have you found any alternative to solve this without downgrading to < 1?

tusharf5 commented 2 months ago

We use patch-package to update the package @naeemdadi-kunai

Shottr 2024-08-26 20 24 31
naeemdadi-kunai commented 2 months ago

We use patch-package to update the package @naeemdadi-kunai

Shottr 2024-08-26 20 24 31

Thank you @tusharf5, this is really helpful!