Error deploy site with plugin gatsby-plugin-sitemap

it runs fine on local development environment but when deploying to netlify error as shown below

  {
    resolve: `gatsby-plugin-sitemap`,
    options: {
      output: `/sitemap.xml`,
      query: `
        {
        site {
            siteMetadata {
                siteUrl
            }
        }

        allSitePage {
          edges {
            node {
              path
              context {
                lastmod
              }
            }
          }
        }
    }`,
      serialize: ({ site, allSitePage }) => {
        return allSitePage.edges.map(edge => {
          return {
            url: site.siteMetadata.siteUrl + edge.node.path,
            changefreq: `daily`,
            lastmod: edge.node.context.lastmod,
            priority: 0.7,
          };
        });
      },
    },
  },

Hey @phannhatchanh,

Could we have a reproduction repo to check?

@hrishikesh Link repo: https://github.com/phannhatchanh/my-site

Hey @phannhatchanh,

That repo seems to be private.