Gridsome: Gridsome SiteMap Plugin has a build error

Created on 22 May 2019  路  3Comments  路  Source: gridsome/gridsome

Description

So, I installed the Sitemap plugin and

  • Added the setting to gridsome.config.js as so
module.exports = {
  siteName: 'mySite',
  siteURL: 'http://localhost:8080',
  siteDescription: '.',
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        path: 'blog/**/*.md',
        typeName: 'BlogPost',
        route: '/blog/:slug',
        remark: {
          plugins: [
            '@gridsome/remark-prismjs'
          ]
        },
        refs: {
          tags: {
            typeName: 'Tag',
            route: '/tag/:slug',
            create: true
          },
          author:{
            typeName: 'Author',
            route: '/author/:slug',
            create: true
          }
        },
      }
    },
    {
      use: '@gridsome/plugin-sitemap', //sitemap plugin
      options: {
        config: {
          '/blog/*': {
            changefreq: 'weekly',
            priority: 0.7
          }
        }
      }
    }
  ]
}

  • I have also added the siteURL, so I don't quite really know why I am getting the below error when I run gridsome build.
Initializing plugins...
Initialize - 2.05s
Load sources - 0.08s
Create GraphQL schema - 0.19s
Create pages and templates - 0.05s
Generate code - 0.05s
Bootstrap finish - 2.42s
Execute GraphQL (14 queries) - 0.32s
Write page data (17 files) - 0.02s
Compile assets - 10.66sRender HTML (14 files) - 0.56s
Process files (0 files) - 0s
Process images (8 images) - 1.28s
Error: Sitemap plugin is missing a required siteUrl config.
    at api.afterBuild (Z:\Projects\site\node_modules\@gridsome\plugin-sitemap\index.js:11:13)
    at Events.dispatch (Z:\Projects\site\node_modules\gridsome\lib\app\Events.js:24:17)

Libs:
-@gridsome/cli v0.1.0
-gridsome v0.6.2

Most helpful comment

The config name is siteUrl, not siteURL :)

All 3 comments

The config name is siteUrl, not siteURL :)

Oops, thank you. That was very stupid of me.

thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NickStees picture NickStees  路  3Comments

mattbrailsford picture mattbrailsford  路  3Comments

nolfranklin picture nolfranklin  路  3Comments

upandfine picture upandfine  路  3Comments

MarcoFaul picture MarcoFaul  路  3Comments