question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

node 18.x compatibility

See original GitHub issue

Same code that runs fine on node 16.x (basic mg.messages.create) fails on node 18.x with following error

TypeError: fetch failed
    at Object.processResponse (node:internal/deps/undici/undici:5575:34)
    at node:internal/deps/undici/undici:5901:42
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:137:8) {
  cause: TypeError: object2 is not iterable
      at action (node:internal/deps/undici/undici:1661:39)
      at action.next (<anonymous>)
      at Object.pull (node:internal/deps/undici/undici:1709:52)
      at ensureIsPromise (node:internal/webstreams/util:172:19)
      at readableStreamDefaultControllerCallPullIfNeeded (node:internal/webstreams/readablestream:1884:5)
      at node:internal/webstreams/readablestream:1974:7
}

node: 18.1.0 mailgun.js: 6.0.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
epaminondcommented, May 16, 2022

@sholladay , you can try this code to reproduce an error: https://github.com/epaminond/mailgun-error-repro Basically error occurs even if you don’t supply correct MAILGUN_API_KEY and MAILGUN_DOMAIN. Hope this helps!

CC @olexandr-mazepa

1reaction
zacharytyhaczcommented, May 14, 2022

Interesting, I wonder why they don’t just use fetch or axios

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js 18 is now available!
Prebuilt binaries for Linux are now built on Red Hat Enterprise Linux (RHEL) 8 and are compatible with Linux distributions based on glibc...
Read more >
Node.js 18.x runtime now available in AWS Lambda
Node.js 18 is now supported by Lambda. When building your Lambda functions using the zip archive packaging style, use a runtime parameter value ......
Read more >
Compatibility and requirements for the Node.js agent
The Node.js agent is compatible with the following operating systems: Linux; SmartOS; macOS 10.7 and higher; Windows Server 2008 and higher The following...
Read more >
Compatibility — Node.js - MongoDB
The following compatibility table specifies the recommended versions of the MongoDB Node.js driver for use with MongoDB. The first column lists the driver ......
Read more >
Node.js Release Working Group - GitHub
Contribute to nodejs/Release development by creating an account on GitHub. ... 20.x, Pending, 2023-04-18, 2023-10-24, 2024-10-22, 2026-04-30 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found