example-helloworld icon indicating copy to clipboard operation
example-helloworld copied to clipboard

Update README to avoid error when localhost resolves to ::1

Open willhickey opened this issue 3 years ago • 1 comments

Problem:

If localhost resolves to ::1 (ipv6) rather than 127.0.0.1 (ipv4) the npm run start step will fail with

Let's say hello to a Solana account...
FetchError: request to http://localhost:8899/ failed, reason: connect ECONNREFUSED ::1:8899
<snipped>

The default Mac version of /etc/hosts contains ::1 localhost so this error will likely be encountered more frequently going forward.

Solution

Update the docs to suggest setting the solana config url to the ipv4 address to avoid the risk of localhost resolving to ipv6

willhickey avatar Aug 05 '22 20:08 willhickey

gitpod-io[bot] avatar Aug 05 '22 20:08 gitpod-io[bot]