TypeError: Cannot read property 'allWordpressPage' of undefined
Opened this issue · 6 comments
I followed your tutorial and i cant get past this graphql error? Even when i clone your repo, results are same...
Do you have Wordpress installed? Does it have REST API enabled. This looks to me like Gatsby is not connecting your Wordpress, you need to double check that.
I have installed wordpress on my local machine and gatsby folder inside worpresss installation...everything worked normally, but when i added gatsby-node.js, page.js and post.js, this error started showing up
Hmmm, can you try and pin point the file that is causing problems and then paste the code here so I can take a look see. Or maybe just paste all three files if you can't pin point the one that is causing problems.
Hello. Same problem here.
error gatsby-node.js returned an error
TypeError: Cannot read property 'allWordpressPage' of undefined
I reinstalled WordPress on my local machine (using proxy),but still not working and receiving this type of error.
Here is my gatsby-config.js:
module.exports = {
siteMetadata: {
title: 'Wordpress Gatsby',
subtitle: `Fetch Data From Local WP Install`,
},
plugins: [
'gatsby-plugin-react-helmet',
{
resolve: "gatsby-source-wordpress",
options: {
baseUrl: "dollyswp.test",
protocol: "http",
hostingWPCOM: false,
useACF: true,
verboseOutput: true
}
},
'gatsby-transformer-sharp',
'gatsby-plugin-sharp'
],
};
Everything works fine in command line - mean, that fetching from url works well
I'm running into this issue right now as well, and it looks like the reason I can't connect is because axios throws an error about a self-signed certificate on my localhost. changing to my local vhost and baseURL to http solved my issue.
I had the same issue, the reason was that in plugins -> options ->
It was: baseUrl: "webpagename",
instead of baseUrl: "webpagename.local"
(or what domain you're using)