79545218

Date: 2025-03-30 22:07:45
Score: 0.5
Natty:
Report link

I think I found a solution. This discussion comment on next.js on github has a similar setup like me - behind a 5G router instead of wired connection to ISP.

Adding the option --network-family-autoselection-attempt-timeout=500 and setting it on NODE_OPTIONS environment variable has solved issue for me as well. As said in the github comment the default --network-family-autoselection-attempt-timeout is 250ms, increasing this seems to be the solution.

export NODE_OPTIONS="--network-family-autoselection-attempt-timeout=500"

The issue is probably related to TypeError: fetch failed - on Node v20.11.1 and v21.7.1, but works on v18.19.1 -

PS: Baffling thing is Debian 12+NAT on VirtualBox also started working!

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Vemman