gatsby: [gatsby-source-wordpress] error UNHANDLED REJECTION during gatsby build or gatsby develop

Seems to occur intermittently when I run gatsby build or gatsby develop, this is occuring locally but also tried to deploy to Netlify and ran into this issue. Seems to work locally if I re-run the command again. Would love to look into it but the error is a bit vague so not sure what step its occurring on.

  • gatsby @1.9.52
  • gatsby-source-wordpress @1.7.10
10:41:01 PM: success open and validate gatsby-config.js — 0.767 s
10:41:01 PM: success copy gatsby files — 0.058 s
10:41:01 PM: success onPreBootstrap — 0.019 s
10:41:03 PM:  -> wordpress__POST fetched : 1
10:41:04 PM:  -> wordpress__PAGE fetched : 2
10:41:05 PM:  -> wordpress__wp_media fetched : 7
10:41:06 PM:  -> wordpress__wp_types fetched : 1
10:41:06 PM:  -> wordpress__wp_statuses fetched : 1
10:41:07 PM:  -> wordpress__wp_taxonomies fetched : 1
10:41:08 PM:  -> wordpress__CATEGORY fetched : 1
10:41:08 PM:  -> wordpress__TAG fetched : 0
10:41:09 PM:  -> wordpress__wp_users fetched : 1
10:41:10 PM:  -> wordpress__wp_comments fetched : 0
10:41:12 PM:  -> wordpress__acf_options fetched : 1
10:41:12 PM: success source and transform nodes — 10.199 s
10:41:13 PM: error UNHANDLED REJECTION
10:41:13 PM: 

  Error: Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but "6" does not.
  
  - Array.forEach
  
  - Array.forEach
  
  - Array.forEach
  
  - Array.forEach

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Try removing gatsby-plugin-postcss-sass from gatsby-config.js and see if that removes the error.

For anyone else who reads this, be advised that your CSS will no longer benefit from autoprefixer. See the related issue #1347 and suggested workaround #318 (comment)

Try removing gatsby-plugin-postcss-sass from gatsby-config.js and see if that removes the error.

@daviddeejjames could you make a go at debugging this?

It’s pretty straightforward to setup a Gatsby development environment. Do that, and then add some console.logs to https://github.com/gatsbyjs/gatsby/blob/1ad48be15af1c30c433c6abb859d19d27f9cf068/packages/gatsby-source-wordpress/src/normalize.js#L29

to see why some of the keys aren’t being prefixed.

If that doesn’t turn up anything, try looking through .cache/redux-state.json to try to find your “6” and see why that isn’t being prefixed along with the rest of the data.