Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"gatsby-theme-wordpress-gutenberg" error running onCreateNode lifecycle #66

Open
alexhwebdev opened this issue Jul 8, 2021 · 1 comment

Comments

@alexhwebdev
Copy link

Hi. Im not sure if there is a solution for this but I am receiving an error while running "gatsby develop".
I have successfully been able to expose the "blocks" in Gatsby with "WP GraphQL Gutenberg" and "gatsby-theme-wordpress-gutenberg" setup and the project works fine running "gatsby develop". But within the build process, I am receiving the error below on the terminal. Thank you in advance.

ERROR #11321 PLUGIN
"gatsby-theme-wordpress-gutenberg" threw an error while running the onCreateNode lifecycle:
Cannot read property 'startsWith' of undefined

411 | } = options
412 |

413 | if (node.internal.owner.startsWith(gatsby-source-wordpress)) {
| ^
414 | if (isNodeWithBlocks({ node })) {
415 | createNodeField({
416 | node,

File: node_modules/gatsby-theme-wordpress-gutenberg/gatsby-node.js:413:27
TypeError: Cannot read property 'startsWith' of undefined

  • gatsby-node.js:413 Object.exports.onCreateNode
    [ibd-gatsby-wordpress-starter]/[gatsby-theme-wordpress-gutenberg]/gatsby-node.js:413:27

  • api-runner-node.js:434 runAPI
    [ibd-gatsby-wordpress-starter]/[gatsby]/src/utils/api-runner-node.js:434:22

  • api-runner-node.js:590 Promise.catch.decorateEvent.pluginName
    [ibd-gatsby-wordpress-starter]/[gatsby]/src/utils/api-runner-node.js:590:13

  • debuggability.js:384 Promise._execute
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/debuggability.js:384:9

  • promise.js:518 Promise._resolveFromExecutor
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/promise.js:518:18

  • promise.js:103 new Promise
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/promise.js:103:10

  • api-runner-node.js:588
    [ibd-gatsby-wordpress-starter]/[gatsby]/src/utils/api-runner-node.js:588:16

  • util.js:16 tryCatcher
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/util.js:16:23

  • reduce.js:166 Object.gotValue
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/reduce.js:166:18

  • reduce.js:155 Object.gotAccum
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/reduce.js:155:25

  • util.js:16 Object.tryCatcher
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/util.js:16:23

  • promise.js:547 Promise._settlePromiseFromHandler
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/promise.js:547:31

  • promise.js:604 Promise._settlePromise
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/promise.js:604:18

  • promise.js:649 Promise._settlePromise0
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/promise.js:649:10

  • promise.js:729 Promise._settlePromises
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/promise.js:729:18

  • async.js:93 _drainQueueStep
    [ibd-gatsby-wordpress-starter]/[bluebird]/js/release/async.js:93:12

@ruimiew
Copy link

ruimiew commented Jan 19, 2022

Did you manage to fix this? Having the exact same issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants