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
The latest 'got' release (v12.6.0) is currently a native ES module and no longer provides a CommonJS export. Currently, the "forward-message-sendgrid" has the older 'got' release (v6.7.1) in its dependencies. While most users tend to upgrade the library in the dependencies to the latest version, they will face the following error.
Error [ERR_REQUIRE_ESM]: require() of ES Module /var/task/node_modules/got/dist/source/index.js from /var/task/handlers/ZNXXXXXXXXXXXXXXXXXXXXXXXXXXX.js not supported. Instead change the require of index.js in /var/task/handlers/ZNXXXXXXXXXXXXXXXXXXXXXXXXXXX.js to a dynamic import() which is available in all CommonJS modules
However, due to Twilio Functions currently does not support ES modules, using the dynamic import() will produce an error too.
Solution:
It is advisable to migrate this example to sendgrid-nodejs (@sendgrid/mail) as it is officially maintained by the Sendgrid team.
Thank you so much for opening your first issue in this project! We'll try to get back to it as quickly as possible. While you are waiting...here's a random picture of a corgi (powered by dog.ceo)
Issue:
The latest 'got' release (v12.6.0) is currently a native ES module and no longer provides a CommonJS export. Currently, the "forward-message-sendgrid" has the older 'got' release (v6.7.1) in its dependencies. While most users tend to upgrade the library in the dependencies to the latest version, they will face the following error.
However, due to Twilio Functions currently does not support ES modules, using the dynamic import() will produce an error too.
Solution:
It is advisable to migrate this example to sendgrid-nodejs (@sendgrid/mail) as it is officially maintained by the Sendgrid team.
PR:
PR #420
The text was updated successfully, but these errors were encountered: