Open davidshq opened 4 years ago
Hey @davidshq -
success createPagesStatefully - 0.077s
suggests that no pages were created.
createPages.js:96
[create-gatsby-theme-publisher]/[@staticfuse]/gatsby-theme-publisher/create/createPages.js:96:13
And this confirms that no pages were created from WordPress anyway. There are no nodes here. A number of things could be going on here but...
1) Is the WPGraphql plugin installed, activated and working? 2) Do you have any pages? 3) Do you have a URL I can take a look at?
Hi Justin,
The WPGraphQL plugin is installed, activated, and working.
There are a number of pages.
URL is dev.liquidchurch.com
(Ignore this for a minute, I just realized I put into the config file https but haven't setup a cert on this site yet, retrying with updated config files)
I setup a fresh install of WP at gatsby.liquidchurch.com to see if the issue was something with my WP install (at dev.liquidchurch.com, which is a copy of a production site).
I added and enabled the WPGraphQL and WPGraphiQL plugins. I disabled all other plugins.
I then followed these steps on my local machine:
git clone https://github.com/staticfuse/create-gatsby-theme-publisher lqdgatsby
cd lqdgatsby
yarn
https://gatsby.liquidchurch.com
https://gatsby.liquidchurch.com/graphql
Main Menu
gatsby develop
But I'm still getting errors...Here is the output from running gatsby develop
. Figured this would be easier to troubleshoot than what I originally posted...
success open and validate gatsby-configs - 0.028s success load plugins - 0.748s success onPreInit - 0.003s success initialize cache - 0.008s success copy gatsby files - 0.058s success onPreBootstrap - 0.012s
ERROR #11321 PLUGIN
"gatsby-source-graphql" threw an error while running the sourceNodes lifecycle:
Unexpected token < in JSON at position 0
ServerParseError: Unexpected token < in JSON at position 0
JSON.parse
index.js:35 [lqdgatsby]/[apollo-link-http-common]/lib/index.js:35:25
task_queues.js:97 processTicksAndRejections internal/process/task_queues.js:97:5
warn The gatsby-source-graphql plugin has generated no Gatsby nodes. Do you need it? success source and transform nodes - 0.470s warn
createResolvers
passed resolvers for typeWPGraphQL_MediaItem
that doesn't exist in the schema. Use success building schema - 0.362sERROR #85901 GRAPHQL
There was an error in your GraphQL query:
Cannot query field "wpgraphql" on type "Query".
File: node_modules\@staticfuse\gatsby-theme-publisher\gatsby-node.js:19:9
ERROR #85901 GRAPHQL
There was an error in your GraphQL query:
Unknown type "WPGraphQL_Post".
File: node_modules\@staticfuse\gatsby-theme-publisher\gatsby-node.js:19:9
ERROR #85901 GRAPHQL
There was an error in your GraphQL query:
Unknown type "WPGraphQL_Post".
File: node_modules\@staticfuse\gatsby-theme-publisher\gatsby-node.js:19:9
ERROR #11321 PLUGIN
"@staticfuse/gatsby-theme-publisher" threw an error while running the createPages lifecycle:
Cannot read property 'wpgraphql' of undefined
TypeError: Cannot read property 'wpgraphql' of undefined
createPosts.js:135 [lqdgatsby]/[@staticfuse]/gatsby-theme-publisher/create/createPosts.js:135:9
createPosts.js:198 async module.exports [lqdgatsby]/[@staticfuse]/gatsby-theme-publisher/create/createPosts.js:198:3
gatsby-node.js:19 async Object.exports.createPages [lqdgatsby]/[@staticfuse]/gatsby-theme-publisher/gatsby-node.js:19:3
failed createPages - 0.195s success createPagesStatefully - 0.068s success onPreExtractQueries - 0.005s success update schema - 0.034s
ERROR #85901 GRAPHQL
There was an error in your GraphQL query:
Unknown type "WPGraphQL_MenuItem".
File: node_modules\@staticfuse\gatsby-theme-publisher\src\components\Menu.js:15:26
failed extract queries from components - 0.512s success write out requires - 0.070s success write out redirect data - 0.008s success onPostBootstrap - 0.006s ⠀ info bootstrap finished - 6.641 s ⠀ success run queries - 0.033s - 3/3 91.26/s warn Browserslist: caniuse-lite is outdated. Please run next command
yarn upgrade
⠀ You can now view create-gatsby-theme-publisher in the browser. ⠀ http://localhost:8000/ ⠀ View GraphiQL, an in-browser IDE, to explore your site's data and schema ⠀ http://localhost:8000/___graphql ⠀ Note that the development build is not optimized. To create a production build, use gatsby build ⠀ success Building development bundle - 4.233s
So for the new, fresh install (gatsby.liquidchurch.com) it was a config mistake on my end. Namely, I had configured the config with https but the site is currently only http.
I'm not sure what the original install's problem was (dev.liquidchurch.com) as that does use https and have a valid cert.
Using a git clone from today (4/8/20), running yarn, and then gatsby develop results in the following error:
NOTE: This only occurs with one of the sites I've tried using this theme for, the other one works fine, no errors...unsure what is causing an issue in this one site.
This was preceded by "USER TOTAL: 5" and followed by "success createPagesStatefully - 0.077s"
I think this caused the static pages that are dynamically created for this site and not sourced from WP to fail (as they return 404's).