LocalWP to GatsbyJS connection error

Issue Summary

Note: this is the same error as reported here, with no posted solution:

I’ve spun up a Wordpress instance using LocalWP, v 6.3.1, and I’ve installed a new instance of Gatsby, opting for the automated Wordpress integration. I added the Graphql endpoint to my Gatsby config, but when I run gatsby develop, it throws this error:

ERROR #gatsby-source-wordpress_111002 PLUGIN

gatsby-source-wordpress Error: connect ECONNREFUSED ::1:10179
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)

GraphQL request to http://localhost:10179/graphql failed.

Please ensure the following statements are true

  • your WordPress URL is correct in gatsby-config.js
  • your server is responding to requests
  • WPGraphQL and WPGatsby are installed and active in your WordPress backend
  • Your WordPress debug.log does not contain critical errors

not finished createSchemaCustomization - 0.056s
not finished gatsby-source-wordpress ensuring plugin requirements are met - 0.051s

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    For all new sites in Local.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes, and yes.

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

System Details

  • Which version of Local is being used? 6.3.1

  • What Operating System (OS) and OS version is being used?

MacOS, version 12.6.2, Monterey.

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

I think I found the solution — I changed the Router Mode to “site domain,” see here:

1 Like

Thank you for coming by and sharing what solved this for you @robertjpeterson1!

1 Like

You’re welcome! I feel silly for not thinking of the fix sooner haha

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.