-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Node18 with localhost #8854
Comments
Thanks for opening this issue! |
What specifically are you referring to and what is the benefit of that adaptation? |
In Node.js 16, it's not necessary to include serverUrl in the configuration file, but in Node.js 18, it's mandatory to specify serverUrl: 127.0.0.1+port+mount in the configuration file; otherwise, it will result in an error. I'm not sure how many other changes might be needed. |
Is that really Parse Server or Node related? |
My configuration file is similar to the following, and it works without any issues in Node 16. However, in versions below Node 18, modifications are required for it to function properly. The MongoDB address needs to be changed from 'localhost' to '127.0.0.1', and a 'serverUrl' needs to be added. |
That may be because Node.js tries to resolve IPv6 first, but you are running in an IPv4 environment, so you need to set
Not sure about that, did you look into the source code to find out what that is? |
When I was looking through the source code, I noticed that 'localhost' is used in many places, and I'm not sure if upgrading to Node 18 will have any impact. |
Please feel free to open a PR |
In node 18 resolution is IPV6 first, in our company we just use explicitly 127.0.0.1, and developers should do so depending of their env. The issue is not related to parse or node, it's just a developer choice, i think we can close this @mtrezza ? |
I understand that the server shouldn't log the error, isn't that the issue here? |
Feature / Enhancement Description
Node18 has altered the resolution for localhost, now defaulting to IPV6. However, examining the internal code, I noticed that many parts are still using 127.0.0.1. Can we adapt to this modification made by Node18?
The text was updated successfully, but these errors were encountered: