Troubleshooting
Before You Begin
This guide is for common troubleshooting tips when developing with the @pantheon-systems/gatsby-wordpress-starter
. For information on troubleshooting on Pantheon, see Pantheon Front-End Sites Frequently Asked Questions.
gatsby-source-wordpress
Fails To Fetch Data From WordPress
There are a few possible reasons for this:
The
WP GraphQL
plugin in WordPress has not been activatedThe
WP Gatsby
plugin in WordPress has not been activatedSolution: activate the plugin
The
gatsby-source-plugin
fails with the following error:Error: getaddrinfo ENOTFOUND dev-my-wordpress-site.pantheonsite.io
at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26)
Error occurred while fetching non-Node root fields.Solution: Check that the WordPress site it active and try the command again. Ensure both the
WP GraphQL
andWP Gatsby
plugins are activated.
WordPress Server Overloaded
Rarely, the gatsby-source-wordpress
server complains of an overloaded WordPress server. If you are experiencing this issue frequently, it is recommended to add the following options to the gatsby-source-wordpress
plugin inside of the gatsby-config.js
. See the plugin options on schema request concurrency for more information.
{
// ...rest of config,
plugins: [
resolve: `gatsby-source-wordpress`,
options: {
url,
schema: {
perPage: 20, // default 100
requestConcurrency: 5, // default 15
previewRequestConcurrency: 2, // default 5
},
},
]
}
Disabling the Decoupled Kit Health Check
After you begin editing content in your WordPress CMS, you may find the
@pantheon-systems/decoupled-kit-health-check
unnecessary. If you would like to
remove it from the build step, follow the steps below:
- In a text editor, open the
package.json
- Find the
"scripts"
and remove"decoupled-kit-health-check": "npx --prefer-offline @pantheon-systems/decoupled-kit-health-check wordpress"
- Edit the
"build"
script and removenpm run decoupled-kit-health-check &&
from the beginning of the script - Find the
"devDependencies"
and remove@pantheon-systems/decoupled-kit-health-check
, Or in a terminal, runnpm rm @pantheon-systems/decoupled-kit-health-check