在构建我的盖茨比网站时,出现以下错误。我尝试删除并重新安装 npm、更新插件、删除(Gatsby)缓存、尝试使用 siteUrl 以及 Gatsby 配置中的各种设置。但我似乎无法摆脱这个错误。开发环境运行良好。
github: https: //github.com/bartfluitsma/gatsby-bart-fluitsma
**Error console log**
ERROR #11321 PLUGIN
"gatsby-plugin-sitemap" threw an error while running the onPostBuild lifecycle:
`siteUrl` does not exist on `siteMetadata` in the data returned from the query.
Add this to your `siteMetadata` object inside gatsby-config.js or add this to your custom query or provide a custom `resolveSiteUrl` function.
https://www.gatsbyjs.com/plugins/gatsby-plugin-sitemap/#api-reference
47 | errors = _yield$graphql.errors;
48 | _context.next = 9;
> 49 | return Promise.resolve(resolveSiteUrl(queryRecords)).catch(function (err) {
| ^
50 | …Run Code Online (Sandbox Code Playgroud)