You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
ng serve seems to only listen on IPv6 per default.
This seems like pretty weird behaviour, as most services do not work like that, and it makes debugging issues which involves networks and proxies kind of unexcepted.
Minimal Reproduction
Serve an application:
ng serve
[..]
Watch mode enabled. Watching for file changes...
Re-optimizing dependencies because lockfile has changed
➜ Local: http://localhost:4200/
➜ press h + enter to show help
It says its listening on localhost.
Localhost is resolving to both ::1 and 127.0.0.1. Still ng decides to only listen on ::1:
This issue is not related to Angular. In Node.js 18, the preference for IPv4 over IPv6 has been removed. Instead, Node.js now respects the order returned by DNS entries. As a result, it is no longer guaranteed that "localhost" will resolve to 127.0.0.1. For more details, see: nodejs/node#39987
Command
serve
Is this a regression?
The previous version in which this bug was not present was
No response
Description
ng serve
seems to only listen on IPv6 per default.This seems like pretty weird behaviour, as most services do not work like that, and it makes debugging issues which involves networks and proxies kind of unexcepted.
Minimal Reproduction
Serve an application:
It says its listening on localhost.
Localhost is resolving to both
::1
and127.0.0.1
. Still ng decides to only listen on::1
:I can force it to run it on IPv4 with binding to
127.0.0.1
or0.0.0.0
, but then it only listens to ipv4, and not 6 of course:Starting it explicitly with
localhost
also only binds it to IPv6:It seems like this "issue" is only reproducible on Linux, on Mac OSX, ng binds "correctly".
Exception or Error
Your Environment
Anything else relevant?
No response
The text was updated successfully, but these errors were encountered: