node.js econnrefused で検索すると次のようなものがでてきた

ECONNREFUSED on NodeJS 18 · Issue #1624 · node-fetch/node-fetch
https://github.com/node-fetch/node-fetch/issues/1624

there was a breaking change in node v17 that changed the default IP resolving. ip6 is preferred by default. You can add dns.setDefaultResultOrder('ipv4first') at the beginning of you app and that should fix the problem

IPv4を使うと解決した、という人がいるようだ
(584さんがどうこうできることではないが)