JavaScript for WordPress › Forums › Gatsby › “gatsby-node.js” threw an error while running the createPages lifecycle: This topic has 2 replies, 2 voices, and was last updated 4 years, 7 months ago by Philip Savarirayan. Viewing 3 posts - 1 through 3 (of 3 total) Author Posts July 11, 2020 at 8:05 am #141898 Philip SavarirayanParticipant “gatsby-node.js” threw an error while running the createPages lifecycle: createPage is not defined 27 | const posts = postsQuery.data.allMdx.nodes 28 | posts.forEach(post =>{ > 29 | createPage({ | ^ 30 | path: /blog/${post.frontmatter.slug}, 31 | component: require.resolve(./src/templates/post.js), 32 | }) Thats the error im getting cant figure out what im doing wrong, any help appreciated thanks July 11, 2020 at 9:04 am #141899 Zac GordonKeymaster Make sure that you are getting createPage from actions. https://github.com/zgordon/gatsby-wordpress-course/blob/da8c9e1b49d58efcb57c33c2ed969db27098dc75/gatsby-wordpress/gatsby/createPosts.js#L25 July 11, 2020 at 10:40 am #141901 Philip SavarirayanParticipant Sorry is working now Author Posts Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In