gatsby: [gatsby-source-wordpress] Gatsby Develop exits with a TypeError

TypeError: Cannot read property 'toString' of undefined

Have tried connecting to the demo.wp-api.org as well as another wordpress self-hosted install and keep getting this error. Not sure what the real issue is here. Gatsby will discover and fetch the routes, but errors when the routes are finished fetching with the above response. Any ideas? Am I missing something?

gatsby@1.9.24 gatsby-source-wordpress@2.0.5

      {
        resolve: 'gatsby-source-wordpress',
        options: {
           /*
          * The base URL of the Wordpress site without the trailingslash and the protocol. This is required.
          * Example : 'gatsbyjsexamplewordpress.wordpress.com' or 'www.example-site.com'
          */
          baseUrl: 'demo.wp-api.org',
          // The protocol. This can be http or https.
          protocol: 'http',
          // Indicates whether the site is hosted on wordpress.com.
          // If false, then the asumption is made that the site is self hosted.
          // If true, then the plugin will source its content on wordpress.com using the JSON REST API V2.
          // If your site is hosted on wordpress.org, then set this to false.
          hostingWPCOM: false,
          // If useACF is true, then the source plugin will try to import the Wordpress ACF Plugin contents.
          // This feature is untested for sites hosted on Wordpress.com
          useACF: false,
          auth: {
            // If auth.user and auth.pass are filled, then the source plugin will be allowed
            // to access endpoints that are protected with .htaccess.
            htaccess_user: '',
            htaccess_pass: '',
            htaccess_sendImmediately: false,
  
            // If hostingWPCOM is true then you will need to communicate with wordpress.com API
            // in order to do that you need to create an app (of type Web) at https://developer.wordpress.com/apps/
            // then add your clientId, clientSecret, username, and password here
            wpcom_app_clientSecret: '',
            wpcom_app_clientId: '',
            wpcom_user: '',
            wpcom_pass: '',
          },
          // Set verboseOutput to true to display a verbose output on `npm run develop` or `npm run build`
          // It can help you debug specific API Endpoints problems
          verboseOutput: true,
        },
      },

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

@drobinhood and thanks for the reproduction site! Super helpful