Skip to content

fix(webpack): Use 127.0.0.1 loopback over locahost - #40625

Merged
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/fix-webpack-use-127-0-0-1-loopback-over-locahost
Oct 27, 2022
Merged

evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/fix-webpack-use-127-0-0-1-loopback-over-locahost

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

This fixes a problem with webpack devserver where localhost will now
sometimes fail to resolve to the IPv4 127.0.0.1 (and instead resolve to ::1)

This is because of Node 18, which we recently bumped to

Node.js 17+ no longer prefers IPv4 over IPv6 for DNS lookups. E.g.
It's not guaranteed that localhost will be resolved to 127.0.0.1 – it
might just as well be ::1 (or some other IP address).

See: https://github.com/chimurai/http-proxy-middleware#nodejs-17-econnrefused-issue-with-ipv6-and-localhost-705

@evanpurkhiser
evanpurkhiser requested review from a team as code owners October 27, 2022 04:22
@evanpurkhiser
evanpurkhiser requested review from a team and removed request for a team October 27, 2022 04:22
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 27, 2022
@evanpurkhiser
evanpurkhiser force-pushed the evanpurkhiser/fix-webpack-use-127-0-0-1-loopback-over-locahost branch from 14d8c41 to 1991a39 Compare October 27, 2022 04:23
This fixes a problem with webpack devserver where localhost will now
sometimes fail to resolve to the IPv4 127.0.0.1 (and instead resolve to ::1)

This is because of Node 18, which we recently bumped to

> Node.js 17+ no longer prefers IPv4 over IPv6 for DNS lookups. E.g.
> It's not guaranteed that localhost will be resolved to 127.0.0.1 – it
> might just as well be ::1 (or some other IP address).

See: https://github.com/chimurai/http-proxy-middleware#nodejs-17-econnrefused-issue-with-ipv6-and-localhost-705
@evanpurkhiser
evanpurkhiser force-pushed the evanpurkhiser/fix-webpack-use-127-0-0-1-loopback-over-locahost branch from 1991a39 to 2af0d0e Compare October 27, 2022 04:42
@evanpurkhiser
evanpurkhiser enabled auto-merge (squash) October 27, 2022 04:42
@evanpurkhiser
evanpurkhiser merged commit 78f86da into master Oct 27, 2022
@evanpurkhiser
evanpurkhiser deleted the evanpurkhiser/fix-webpack-use-127-0-0-1-loopback-over-locahost branch October 27, 2022 05:01
jan-auer added a commit that referenced this pull request Oct 27, 2022
* master: (82 commits)
  ref(test): Convert account security details to rtl and ts (#40638)
  fix(appconnect): Drop app_id column (#40326)
  test(js): Convert InviteMembersModal to RTL (#40637)
  test(js): Convert fieldRenderers to RTL (#40633)
  chore(events): Use longKeys for Java packages (#40539)
  ref(ui): Remove deprecatedforms from AdminQuotas (#40627)
  ref(js): Convert InviteRowControl to a FC (#40634)
  feat(ui): Improve aria attributes of menu items (#40573)
  feat(js): Report usage of deprecatedforms in window.SentryApp (#40628)
  ref(ui): Remove deprecatedforms/selectField in AdminQueue (#40626)
  ref(js): Convert TitleStar to a FC (#40632)
  feat(ui): Label Settings Serach input (#40630)
  ref(js): Extract permissionStateToList out of class (#40620)
  ref(js): Be consistent about `domId` with `useMemo` (#40622)
  feat(ui): Use `nav` For settings navigations (#40576)
  fix(webpack): Use 127.0.0.1 loopback over locahost (#40625)
  test(discover): Convert eventsRequest.spec.jsx to RTL (#40585)
  fix(ui): Remove invalid `role="text"` (#40579)
  feat(ui): Use `header` for Layout.Header component (#40580)
  (fix): self-hosted e2e env variable update (#40619)
  ...
jan-auer added a commit that referenced this pull request Oct 27, 2022
* master: (82 commits)
  ref(test): Convert account security details to rtl and ts (#40638)
  fix(appconnect): Drop app_id column (#40326)
  test(js): Convert InviteMembersModal to RTL (#40637)
  test(js): Convert fieldRenderers to RTL (#40633)
  chore(events): Use longKeys for Java packages (#40539)
  ref(ui): Remove deprecatedforms from AdminQuotas (#40627)
  ref(js): Convert InviteRowControl to a FC (#40634)
  feat(ui): Improve aria attributes of menu items (#40573)
  feat(js): Report usage of deprecatedforms in window.SentryApp (#40628)
  ref(ui): Remove deprecatedforms/selectField in AdminQueue (#40626)
  ref(js): Convert TitleStar to a FC (#40632)
  feat(ui): Label Settings Serach input (#40630)
  ref(js): Extract permissionStateToList out of class (#40620)
  ref(js): Be consistent about `domId` with `useMemo` (#40622)
  feat(ui): Use `nav` For settings navigations (#40576)
  fix(webpack): Use 127.0.0.1 loopback over locahost (#40625)
  test(discover): Convert eventsRequest.spec.jsx to RTL (#40585)
  fix(ui): Remove invalid `role="text"` (#40579)
  feat(ui): Use `header` for Layout.Header component (#40580)
  (fix): self-hosted e2e env variable update (#40619)
  ...
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2022

This branch was successfully deployed

2 active deployments
Preview – storybook — 2af0d0e0 Deployed Oct 27, 2022 by vercel[bot]
Preview – sentry — 2af0d0e0 Deployed Oct 27, 2022 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants