gatsby-starter-personal-blog
gatsby-starter-personal-blog copied to clipboard
TypeError: Cannot read property 'slug' of null
I started adding new posts to the blog following the format of markdown and after a few successful additions this error suddenly comes up:
TypeError: Cannot read property 'slug' of null
ListItem.render
src/components/Navigator/ListItem.js:144
141 | <li
142 | className={`${classes.listItem} ${post.node.frontmatter.category}`}
143 | style={{ display: `${this.state.hidden ? "none" : "block"}` }}
> 144 | key={post.node.fields.slug}
145 | >
146 | <Link
147 | activeClassName="active"
When removing "problematic" posts, error persists. So it still persists with good posts and sometimes works with problematic posts. I am at a loss with a reason.
Are you able to point to what this means or how to address it?
I don't know the exact reason, But delete .cache
folder and run gatsby develop
again.
It will work well.