Skip to content

Conversation

@ElijahJunaid
Copy link

Fixes #7747 Part 3

Problem: The original logic for detectFrameworkHost was inverted: it was set to true when skipWaitPort was true, meaning IPv4/IPv6 auto-detection was only enabled when port checking was skipped. This caused connection failures in Node.js 24.x environments where the framework server binds to IPv6 ([::1]) but the proxy attempts to connect via IPv4 (127.0.0.1).

Solution: Fixed the logic to:
settings.detectFrameworkHost = !options.skipWaitPort
Now IPv4/IPv6 auto-detection is correctly enabled when port checking is active (skipWaitPort = false), allowing the proxy to automatically switch between 127.0.0.1 and [::1] if connection attempts fail with ECONNREFUSED.

Impact:
When port checking is enabled → detectFrameworkHost = true → proxy can detect and switch IP versions ✓
When port checking is skipped → detectFrameworkHost = false → no auto-detection needed ✓

Testing:
✅ Tested with Nuxt 4.x on Node.js 24.6.0 where server binds to IPv6
✅ Verified proxy successfully switches from IPv4 to IPv6 on connection failure
✅ Maintains backward compatibility

@ElijahJunaid ElijahJunaid requested a review from a team as a code owner October 29, 2025 16:27
@ElijahJunaid
Copy link
Author

@serhalp didn't know how to do one pull request for many files but these 3 pull requests should fix the issue i had, causing no other individual issues as the edits were precise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ECONNRESET crash when using Netlify CLI with Node.js 24.x and Nuxt 4.x dev server

1 participant