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
Description:
There's a current issue with Node.js versions 17 and above where using localhost in URLs for HTTP requests results in failure, whereas using 127.0.0.1 works as expected. This issue is documented and tracked in the Node.js GitHub repository (nodejs/node#40702).
Problem Statement:
Due to this issue, accessing endpoints like http://localhost:11434/api/generate in Node.js >= 17 fails to resolve properly.
Solution (Temporary Fix):
A temporary fix is to replace localhost with 127.0.0.1 in the URL to ensure proper resolution. For example:
http://127.0.0.1:11434/api/generate
Proposed Improvement:
It would be beneficial to have the ability to specify the endpoint URL through command-line arguments or configuration settings until the underlying issue in Node.js is resolved. This would allow users to easily adapt to this change without modifying the code.
Request:
Could a change be implemented to allow users to specify their own endpoint URLs through arguments or configuration settings? Alternatively, consider updating the code to replace localhost with 127.0.0.1 internally until the Node.js issue is resolved.
Additional Context:
I've implemented a local fix in my repository, but having this addressed at the project level would greatly benefit other users encountering the same issue.
Thanks!
The text was updated successfully, but these errors were encountered:
chsami
changed the title
Issue: Difficulty Accessing Localhost with Node.js >= 17
Bug Accessing Localhost with Node.js >= 17
Apr 8, 2024
Description:
There's a current issue with Node.js versions 17 and above where using localhost in URLs for HTTP requests results in failure, whereas using 127.0.0.1 works as expected. This issue is documented and tracked in the Node.js GitHub repository (nodejs/node#40702).
Problem Statement:
Due to this issue, accessing endpoints like http://localhost:11434/api/generate in Node.js >= 17 fails to resolve properly.
Solution (Temporary Fix):
A temporary fix is to replace localhost with 127.0.0.1 in the URL to ensure proper resolution. For example:
http://127.0.0.1:11434/api/generate
Proposed Improvement:
It would be beneficial to have the ability to specify the endpoint URL through command-line arguments or configuration settings until the underlying issue in Node.js is resolved. This would allow users to easily adapt to this change without modifying the code.
Request:
Could a change be implemented to allow users to specify their own endpoint URLs through arguments or configuration settings? Alternatively, consider updating the code to replace localhost with 127.0.0.1 internally until the Node.js issue is resolved.
Additional Context:
I've implemented a local fix in my repository, but having this addressed at the project level would greatly benefit other users encountering the same issue.
Thanks!
The text was updated successfully, but these errors were encountered: