Gatsby: TypeError: Cannot read property 'match' of undefined

Created on 27 Jan 2020  路  7Comments  路  Source: gatsbyjs/gatsby

Why is there no way to debug GraphQL if it doesn't load on start?
TypeError: Cannot read property 'match' of undefined with no line numbers is not a useful error.
I've been on this bullshit for hours. There's no problem exxcept Gatsby can't keep relevant line numbers. Must be busy with all that interconnectedness.
I quit Gatsby!

Most helpful comment

We are getting the same error on our builds of gatsby.

2:22:51 PM: failed Building production JavaScript and CSS bundles - 11.865s
2:22:51 PM: error Generating JavaScript bundles failed
2:22:51 PM: Cannot read property 'match' of undefined

Looking for any tips on how to resolve it, this is only happening when we build in netlify at the moment. Local builds are 馃憤

All 7 comments

There are plenty of users willing to help and potentially fix errors which will cause substantial issues for users of Gatsby, but in order to do so they need clear descriptive issues to work with.

Unfortunately, this is not clear what's causing your error. As this seems more like venting frustrations than attempt to resolve the issue, i'll close this bug. If you can provide a more substantial error report, we can look into the potential issue.

Haha. Damn right it's venting. Fix your software. These errors are a black box.

We are getting the same error on our builds of gatsby.

2:22:51 PM: failed Building production JavaScript and CSS bundles - 11.865s
2:22:51 PM: error Generating JavaScript bundles failed
2:22:51 PM: Cannot read property 'match' of undefined

Looking for any tips on how to resolve it, this is only happening when we build in netlify at the moment. Local builds are 馃憤

I'm currently using NetlifyCMS + Gatsby, and this error started occurring when I removed some template files from the NetlifyCMS + Gatsby starter. I continued to remove references to that removed file from the CMS config.yml and the CMS preview files, and all of the sudden it worked.

I doubt that'll help anyone else, but it's better than nothing. Good luck in figuring it out!

In my case, this error message was a red herring from a GraphQL issue. 'title' and 'keywords' were required values in my frontmatter. Ensuring that my Markdown files had them fixed the error!

Having the same error when running npm run dev:

image

Honestly wishing the Gatsby team could consider this an actual problem @KyleAMathews, as this error is several months old and still plaguing users. Black box error with no descriptive error or feedback.

(I hate to ping you, and sorry about it, but I have no idea how to get the attention of any team member on a closed issue, because of how Github works with closed issues)

It happens on production (Netlify), but not on development, neither as a build locally.

This issue is the first link on Google for me, at the moment. If you have a redirection, or a duplicate, it would be awesome to link to it so users know what/where to follow up, if a fix is to be made.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dustinhorton picture dustinhorton  路  3Comments

hobochild picture hobochild  路  3Comments

timbrandin picture timbrandin  路  3Comments

totsteps picture totsteps  路  3Comments

theduke picture theduke  路  3Comments