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 127.0.0.1 as default hostname #2057

Merged
merged 2 commits into from
Nov 16, 2021
Merged

Conversation

alcuadrado
Copy link
Member

Banteg originally reported that with the new version of Node.js he couldn't connect to hardhat node. The reason is that now node resolves "localhost" to an ipv6, so we only listen on ipv6 by default.

This PR fixes that by making it explicit that we want the ipv4 version of localhost (i.e. 127.0.0.1)

@changeset-bot
Copy link

changeset-bot bot commented Nov 10, 2021

🦋 Changeset detected

Latest commit: 324762a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hardhat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@alcuadrado alcuadrado requested a review from fvictorio November 11, 2021 00:39
@fvictorio
Copy link
Member

Should we update the default localhost network too?

@alcuadrado
Copy link
Member Author

Should we update the default localhost network too?

it's already 127.0.0.1. See:
https://github.com/nomiclabs/hardhat/blob/master/packages/hardhat-core/src/internal/core/config/default-config.ts#L17

@alcuadrado
Copy link
Member Author

@fvictorio can you review/approve this?

@alcuadrado alcuadrado merged commit aa1a008 into master Nov 16, 2021
@alcuadrado alcuadrado deleted the use-ipv4-instead-of-localhost branch November 16, 2021 20:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants