Cannot read property 'node' of undefined Error

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

  • What’s your URL? This is the easiest way for others to debug your issue
  • What version of Ghost are you using? latest
  • What configuration?
  • What browser? Chrome
  • What errors or information do you see in the console?
  • What steps could someone else take to reproduce the issue you’re having?

Hi! I hava a question about installation.
I followed your guide in github.

1.clone source
3.gatsby develop

But, I have some wrong message webpage after build.
following is error page.

I really hope to get answer.
Thank you

Hey there, unfortunately I don’t have the anwser, but the same problem. Other sources told me so far to remove the trailing slash at siteUrl/apiUrl in /gatsby-config.js, src/utils/siteConfig.js and /.ghost.json.
I had it in a couple of places and removed it, but for me no luck.

In JavaScript almost everything is an object, null and undefined are exceptions. This error occurs when a property is read or a function is called on an undefined variable. Undefined means that a variable has been declared but has not been assigned a value. In JavaScript, properties and functions can only belong to objects. Since undefined is not an object type, calling a function or a property on such a variable causes the TypeError: Cannot read property of undefined.

If you are not sure a variable that will always have some value, the best practice is to check the value of variables for null or undefined before using them. To avoid getting these types of errors, you need to make sure that the variables you are trying to read do have the correct value. This can be done in various ways. You can do if checks before dealing with objects whose values are bound to change:

if (myVar !== undefined) {


if (typeof(myVar) !== 'undefined') {