Skip to content

Failed to fetch baseUrl #13

Open
Open
@BetaPundit

Description

I am unable to fetch data from the WordPress url. I simply put the url of the WordPress website in the baseUrl field.
The error says:

Error: Failed to fetch baseUrl https://discover.wordpress.com/
at WordPressSource.fetchWordPressContent (Z:\My Work\Projects\sample-project\node_modules@gridsome\source-wordpress\index.js:33:13)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

Here's the code in gridsome.confg.js:

module.exports = {
  siteName: 'Gridsome',
  siteDescription: 'A WordPress starter for Gridsome',
  plugins: [
    {
      use: '@gridsome/source-wordpress',
      options: {
        baseUrl: 'https://discover.wordpress.com/', // required
        typeName: 'WordPress', // GraphQL schema name (Optional)
        perPage: 3, // How many posts to load from server per request (Optional)
        concurrent: 10, // How many requests to run simultaneously (Optional)
        routes: {
          post: '/:year/:month/:day/:slug', //adds route for "post" post type (Optional)
          post_tag: '/tag/:slug' // adds route for "post_tag" post type (Optional)
        }
      }
    }
  ]
}

Everything else is the same as in the gridsome WordPress starter template.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions