wp-graphql / wp-graphql-woocommerce

Add WooCommerce support and functionality to your WPGraphQL server
https://woographql.com
GNU General Public License v3.0
644 stars 131 forks source link

Can't start a new installation : Encountered a critical error when running the sourceNodes.sourceNodes build step #516

Closed hrenaud closed 3 years ago

hrenaud commented 3 years ago

Describe the bug The build of gatsby is not done. It gets an error and returns this simple error:

TypeError: Cannot destructure property 'hasNextPage' of '{}' as it is null.
    at paginatedWpNodeFetch (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/g
atsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes-paginated.js:87:47)

To Reproduce Steps to reproduce the behavior:

  1. gatsby clean && gatsby develop or gatsby develop

Expected behavior A complete build with my datas readable with GraphiQL

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Plugin Versions

Additional context

"dependencies": {
    "gatsby": "^3.6.2",
    "gatsby-plugin-image": "^1.7.1",
    "gatsby-plugin-manifest": "^3.7.1",
    "gatsby-plugin-react-helmet": "^4.7.1",
    "gatsby-plugin-sharp": "^3.7.1",
    "gatsby-plugin-sitemap": "^4.3.1",
    "gatsby-source-filesystem": "^3.7.1",
    "gatsby-source-wordpress": "^5.7.1",
    "gatsby-transformer-sharp": "^3.7.1",
    "react": "^17.0.1",
    "react-dom": "^17.0.1",
    "react-helmet": "^6.1.0"
  }

the error log

gatsby clean && gatsby develop --verbose
info Deleting .cache, public,
/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/.cache/babel-loader,
/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/.cache/terser-webpack-plugin
info Successfully deleted directories

verbose set gatsby_log_level: "verbose"
verbose set gatsby_executing_command: "develop"
verbose loading local command from: /Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_mo
dules/gatsby/dist/commands/develop.js
verbose running command: develop

verbose Transition to "initializing"
success open and validate gatsby-configs - 0.224s
success load plugins - 4.552s
success onPreInit - 0.080s
success initialize cache - 0.022s
success copy gatsby files - 0.241s
verbose Attaching functions to development server
success Compiling Gatsby Functions - 0.965s
success onPreBootstrap - 1.020s
verbose Transition to "initializingData"
success  gatsby-source-wordpress  ensuring plugin requirements are met - 1.864s
⠀
info  gatsby-source-wordpress 

        This is either your first build or the cache was cleared.
        Please wait while your WordPress data is synced to your Gatsby cache.

        Maybe now's a good time to get up and stretch? :D

warn  gatsby-source-wordpress  Unable to find a single Node query for PaymentGateway
        This type will not be available in Gatsby.

success  gatsby-source-wordpress  ingest WPGraphQL schema - 4.246s
success createSchemaCustomization - 6.270s
verbose Transition to "initializingData" > "sourcingNodes"

 ERROR 

TypeError: Cannot destructure property 'hasNextPage' of '{}' as it is null.
    at paginatedWpNodeFetch (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/g
atsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes-paginated.js:87:47)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at fetchWPGQLContentNodes (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules
/gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes.js:44:26)
    at /Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/gatsby-source-wordpress
/src/steps/source-nodes/fetch-nodes/fetch-nodes.js:149:30
    at /Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/gatsby-source-wordpress
/src/steps/source-nodes/fetch-nodes/fetch-nodes.js:139:9
    at async Promise.all (index 3)
    at runFnForEachNodeQuery (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/
gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes.js:127:5)
    at fetchWPGQLContentNodesByContentType (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter
/node_modules/gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes.js:148:3)
    at fetchAndCreateAllNodes (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules
/gatsby-source-wordpress/src/steps/source-nodes/fetch-nodes/fetch-nodes.js:183:37)
    at sourceNodes (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/gatsby-sou
rce-wordpress/src/steps/source-nodes/index.ts:55:5)
    at runSteps (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/gatsby-source
-wordpress/src/utils/run-steps.ts:41:9)
    at runAPI (/Users/renaudheluin/kDrive/vsc-files/_GATSBY/nova-wordpress-gatsby-starter/node_modules/gatsby/src/util
s/api-runner-node.js:429:16)

 ERROR #gatsby-source-wordpress_112003 

 gatsby-source-wordpress 

        Encountered a critical error when running the sourceNodes.sourceNodes build step.
        See above for more information.

not finished source and transform nodes - 1.608s
not finished  gatsby-source-wordpress  fetch root fields - 1.520s
not finished  gatsby-source-wordpress  fetching nodes - 1.532s - 0 total
not finished  gatsby-source-wordpress  Category - 1.543s
not finished  gatsby-source-wordpress  Comment - 1.541s
not finished  gatsby-source-wordpress  ContentType - 1.544s
not finished  gatsby-source-wordpress  Coupon - 1.543s
not finished  gatsby-source-wordpress  Customer - 1.552s
not finished  gatsby-source-wordpress  MenuItem - 1.552s
not finished  gatsby-source-wordpress  Menu - 1.549s
not finished  gatsby-source-wordpress  Order - 1.556s
not finished  gatsby-source-wordpress  PaColor - 1.542s
not finished  gatsby-source-wordpress  PaSize - 1.549s
not finished  gatsby-source-wordpress  Page - 1.547s
not finished  gatsby-source-wordpress  PostFormat - 1.534s
not finished  gatsby-source-wordpress  Post - 1.524s
not finished  gatsby-source-wordpress  ProductCategory - 1.497s
hrenaud commented 3 years ago

Hello,

What can I do while waiting for the next release?

Thanks