-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - Node 18 - ng serve - something has changed in Node v18 #24442
Comments
Had a similar issue, and had to use |
did you have any issues with |
Sorry I don't use hmr, so I didn't see any issue for that My understanding is that using 0.0.0.0 makes the port open for any of your IPs (ie: if you have 2 network cards, or have virtual networks) instead of just a specific one, so not sure it should have an impact? |
@alan-agius4 I see you transferred this issue.. not sure how to see where it was transferred to... breaks in 18
this does work
So... I guess this issue can be closed... tho it would be nice to know what changed to break it. |
From our end nothing changed as we use webpack-dev-server under the hood. Probably what is happening here is that the hostname was not being resolved correctly. See: webpack/webpack-dev-server#416 (comment) |
Interesting this gets closed. I mean, it may be fact that you did not change anything, but another fact is that anyone generating a new project via CLI cannot hit breakpoints when using Node 18 with the default configuration. In other words: I don't know how serious you rate this, but I think it is bad for anyone starting out with the CLI and trying to get the debugger running. |
@Franiac, from what you are describing you are experiencing a different problem. |
@alan-agius4 true, created and referenced the new issue 😄 |
After looking into another issue, Node.js 18 no longer prefers IPv4 over IPV6 Instead, it will now respect the order that is returned based on the dns entries. This means that it's not guaranteed that localhost is resolved to 127.0.0.1. See: nodejs/node#39987 |
@alan-agius4 What does that mean for the default projects of Angular/CLI?
|
Technically, Node.js is doing the right thing here as it is respecting the OS settings. For the vscode issue (#24601) which incorrectly assumes that
For this issue the correct resolution is:
|
Thx for the info! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
Not sure if this is an issue with Angular or webpack-dev-server... but here goes:
I use a docker apache proxy locally so my dev env is more like production:
www.myapp.local
instead oflocalhost:4200
But when I try to bump node up to v18... the angular proxy falls apart and does not work. The node api proxy works fine, its just the angular connection that breaks.
I start node like this
host file (pretty typical)
my docker apache (nothing crazy here):
FROM php:5.6-apache
If on v18 the proxy does not work... apache error:
Again... the node/api proxy still works fine.
I was able to get it to "kinda" work in v18 by setting
--host=0.0.0.0
as well... but thehrm
websockets were throwing errors in the client... so... after several hours of trying... I could not get this setup to work in v18.Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
Might be webpack-dev-server issue and unrelated to angular in general?
The text was updated successfully, but these errors were encountered: