-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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 Build Doesn't Work Without Cache #1952
Comments
I ran into something similar and resolved it by ensuring all of my dates in frontmatter were wrapped in quotes. Otherwise I'd have a similar issue where every other build/develop attempt would result in the error you are receiving. It's a temp fix while you're building at the very least. I wasn't able to narrow down the underlying problem. Perhaps someone with a better understanding of the graphql setup can dig in. edit: I think I know how to fix this in the way moment is set up. Working on it. |
Looks like it is an issue with quotes. I just quoted all of my dates and it works. |
Okay, so I narrowed this down further. It's not moment's fault, but rather graymatter's by way of the remark transformer. Graymatter parses a (non-string)date in YAML as a Date object, which seems to make the whole chain mad. Going to test a fix(albeit an pretty inelegant one involving stringifying and parsing the json) on a few blogs from the readme. If anyone knows a good reason why stripping the YAML data down to plain objects instead of instanced objects would be a bad idea for this, please let me know. If all goes smoothly I'll put a PR together. |
@markmichon and others check out #1964 Hadn't realized gray-matter was making date objects! Explains this weird bug. |
I got this same error, when I used the fragment GatsbyContentfulResolutions_noBase64 in a query from the gatsby-node.js. I then replaced the fragment with the query fields and the error went away. |
Here is the source for my work-in-progress site: https://github.com/knpwrs/knpw.rs
When I run
gatsby build
, I get the following output:When I run
gatsby develop
I'll get a.cache
directory which will then makegatsby build
work. If I delete that cache directory thengatsby build
goes back to the previous output. Is this intentional? Whats' going on?The text was updated successfully, but these errors were encountered: