diff --git a/packages/cli/bin/n8n b/packages/cli/bin/n8n index e274ba2b68..9b6433fc56 100755 --- a/packages/cli/bin/n8n +++ b/packages/cli/bin/n8n @@ -47,6 +47,14 @@ if (process.env.NODEJS_PREFER_IPV4 === 'true') { require('dns').setDefaultResultOrder('ipv4first'); } +// Node.js 20 enabled a Happy Eyeballs algorithm which enables support +// for both IPv6 and IPv4 at the same time, favoring IPv6 when possible. +// However there are some issues in the algorithm implementation that is causing +// issues to our users with services like Telegram or Airtable. This restores the +// behavior to pre v20 +// More details: https://github.com/nodejs/node/issues/48145 +require('net').setDefaultAutoSelectFamily?.(false); + (async () => { const oclif = await import('@oclif/core'); await oclif.execute({ dir: __dirname });