Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Node v17.1.0 resolves localhost differently #375

@yasushisakai

Description

@yasushisakai

While the README recommends node's version to be 14, I tried 17.1.0 (that was installed in my system) and npm start did not work, giving the following error:

FetchError: request to http://localhost:8899/ failed, reason: connect ECONNREFUSED ::1:8899
    at ClientRequest.<anonymous> (/home/yasushi/code/solana/example-helloworld/node_modules/node-fetch/lib/index.js:1461:11)

This comes from the node resolving localhost to IPv6's ::1, not 127.0.0.1. This is totally from upstream, and does nothing to do with this example, but I suggest that it should be written stronger in the README.md that other versions of node may not work...

The current LTS 16.13.1 did work.

others have pointed out this behavior:
okTurtles/group-income#1108

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions