Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

TypeError: Cannot read property 'slug' of null #101

Open
vadymus opened this issue Nov 5, 2019 · 1 comment
Open

TypeError: Cannot read property 'slug' of null #101

vadymus opened this issue Nov 5, 2019 · 1 comment

Comments

@vadymus
Copy link

vadymus commented Nov 5, 2019

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?

@cron-tab
Copy link

I don't know the exact reason, But delete .cache folder and run gatsby develop again.
It will work well.

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

No branches or pull requests

2 participants