gatsby build stuck on createPages - gatsby wordpress starter

Created on 7 May 2018  ·  3Comments  ·  Source: gatsbyjs/gatsby

I have been trying this for some time, unfortunately had no luck. Please help! Thanks!

Also, there was no Wordpress Tags on my website, it was throwing an error. So, I create two tags and it got fetched.

Stuck on createPages

  • `source and transform nodes -> wordpress__POST fetched : 25
  • ⢀ source and transform nodes -> wordpress__PAGE fetched : 6
  • ⢀ source and transform nodes -> wordpress__wp_media fetched : 44
  • ⠂ source and transform nodes -> wordpress__wp_types fetched : 1
  • ⠂ source and transform nodes -> wordpress__wp_statuses fetched : 1
  • ⠐ source and transform nodes -> wordpress__wp_taxonomies fetched : 1
  • ⢀ source and transform nodes -> wordpress__CATEGORY fetched : 11
  • ⢀ source and transform nodes -> wordpress__TAG fetched : 2
  • ⠂ source and transform nodesThe server response was "403 Forbidden"
  • ⢀ source and transform nodesThe server response was "401 Unauthorized"
  • Inner exception message : "You are not currently logged in."
  • ⡀ source and transform nodes -> wordpress__wp_comments fetched : 0
  • ⠐ source and transform nodesThe server response was "401 Unauthorized"
  • Inner exception message : "Sorry, you are not allowed to do that."
  • success source and transform nodes — 46.407 s
  • success building schema — 2.282 s
  • success createLayouts — 0.257 s
  • ⢀ createPages

`

question or discussion

Most helpful comment

You should put resolve() after createPage function

For example,

exports.createPages = ({ graphql, boundActionCreators }) => {
   const { createPage } = boundActionCreators;

   return new Promise((resolve, reject) => {
      createPage({
         path: '/someroute',
         component: path.resolve('./src/component.jsx'),
         context: {
            slug: 'Hello World',
         },
       });
      resolve()
   }
}

All 3 comments

You should put resolve() after createPage function

For example,

exports.createPages = ({ graphql, boundActionCreators }) => {
   const { createPage } = boundActionCreators;

   return new Promise((resolve, reject) => {
      createPage({
         path: '/someroute',
         component: path.resolve('./src/component.jsx'),
         context: {
            slug: 'Hello World',
         },
       });
      resolve()
   }
}

@aks84 I was having the same issue and @gapgag55's solution worked for me.

Added resolve() to the gatbsy-node.js file, just after line 128 (// === END TAGS ===).

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andykais picture andykais  ·  3Comments

dustinhorton picture dustinhorton  ·  3Comments

Oppenheimer1 picture Oppenheimer1  ·  3Comments

mikestopcontinues picture mikestopcontinues  ·  3Comments

ghost picture ghost  ·  3Comments