Skip to content
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

Use ipv4 loopback address #252

Merged
merged 1 commit into from
Feb 1, 2023
Merged

Use ipv4 loopback address #252

merged 1 commit into from
Feb 1, 2023

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Jan 27, 2023

I tried to update my app to Node 18, and found that the test-runner started to fail. I learned it was because of a change in Node 17 to no longer sort the results of getaddrinfo to prefer ipv4 addresses. This means on some machines after node 17, localhost no longer resolves to 127.0.0.1.

Therefore, running http-server storybook-static --port 6006 and then test-storybook will no longer work, because localhost is looking for an ipv6 address, and http-server sets up on ipv4.

As a workaround, I can use --url http://127.0.0.1:6006, but that seems like it shouldn't be necessary.

So this change looks for 127.0.0.1 explicitly as the default, and updates the documentation to reference it that way as well. I tested this back to node 16 and of course it works fine there too.

This should make it a bit easier for folks to upgrade to node 18 without nasty surprises.

Version

Published prerelease version: v0.10.0-next.7

Changelog

🚀 Enhancement

🐛 Bug Fix

📝 Documentation

Authors: 7

@IanVS IanVS requested review from shilman and yannbf January 27, 2023 02:48
Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @IanVS !

@yannbf yannbf added the patch Increment the patch version when merged label Feb 1, 2023
@yannbf yannbf merged commit 2bff48a into next Feb 1, 2023
@yannbf yannbf deleted the node-18 branch February 1, 2023 16:17
yannbf added a commit that referenced this pull request Feb 1, 2023
@yannbf yannbf mentioned this pull request Feb 1, 2023
@github-actions github-actions bot mentioned this pull request Mar 31, 2023
@github-actions github-actions bot mentioned this pull request Apr 3, 2023
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

🚀 PR was released in v0.10.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged prerelease released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants