Cannot read property 'fields' of undefined #12894
Replies: 5 comments 3 replies
-
Almost always necessary to include some sort of code sample, link to repo, or explicit error message for help to be possible, especially on common errors like "undefined". Find out what object "fields" was being read from, find the line in code where this occurs. Find where this object should be initialized with data, or guarded for not existing Quick search of "fields" in this repo https://github.com/zeit/next.js/search?q=fields&unscoped_q=fields shows this file: Ctrl+F "fields" shows usage of it. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
That error is saying that Something isn't set up right with the information you're receiving from Contentful. I would compare that |
Beta Was this translation helpful? Give feedback.
-
SOLVED! I found out that the name of the author image should also be 'picture'. I called it 'image'. Discussion closed; and a big thankyou to all contributors! |
Beta Was this translation helpful? Give feedback.
-
I'm also getting a missing field, but the missing field is
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am following the example how to build a cms-contentful blog. I get the error message: "Cannot read property 'fields' of undefined". Relatively new to next.js; where should I look and what should I do to find the source of this error?
Beta Was this translation helpful? Give feedback.
All reactions