[Bug] Incremental Build Fails when using sitemap plugin
See original GitHub issueIf I run build
, everything works as expected, but when I run increment
with the react-static-sitemap-plugin I get the following error:
[✓] HTML Exported (10.4s)
Generating sitemap.xml...
Error: Trace: Error: The sitemap url prefix cannot be empty or undefined!
Environment
System:
OS: macOS 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Memory: 3.46 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.6.0 - /usr/local/bin/node
Yarn: 1.16.0 - ~/.yarn/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Browsers:
Firefox: 67.0.1
Safari: 12.1.1
npmPackages:
react: ^16.9.0 => 16.9.0
react-cookie: ^4.0.1 => 4.0.1
react-credit-card-input: ^1.1.5 => 1.1.5
react-div-100vh: ^0.3.4 => 0.3.4
react-dom: ^16.9.0 => 16.9.0
react-gtm-module: ^2.0.7 => 2.0.8
react-payment-inputs: ^1.0.6 => 1.0.6
react-router-dom: ^5.0.1 => 5.0.1
react-static: ^7.1.0 => 7.2.2
react-static-plugin-less: ^1.0.2 => 1.0.2
react-static-plugin-reach-router: ^7.0.10 => 7.2.2
react-static-plugin-react-router: ^7.0.10 => 7.2.2
react-static-plugin-sitemap: ^7.0.10 => 7.2.2
react-static-plugin-source-filesystem: ^7.1.0 => 7.2.2
react-static-plugin-typescript: ^7.0.10 => 7.2.2
react-structured-data: ^0.0.14 => 0.0.14
react-virtualized: ^9.21.1 => 9.21.1
npmGlobalPackages:
react-native-cli: 2.0.1
of course include any other package versions here if relevant.
Steps to Reproduce the problem
- Try to run
yarn increment
with the react-static-sitemap-plugin
Expected Behavior
This should run the same as build, with no errors during output.
Reproducible Demo
I do not have one at this time but will work on one.
Additional Note
The error mentions that url prefix cannot be empty, but I have siteRoot defined in static.config.js
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Build is not incremental · Issue #30202 · gatsbyjs/gatsby · GitHub
My Gatsby 3.0 site is being built on every push with a Github action. I'm seeing that many pages are being re-built even...
Read more >Critical error after latest update | WordPress.org
I installed ver 2.06 a couple of days ago on a simple 3-page website. Updated just now to 2.07. The plugin appears not...
Read more >Problems running cron to build the sitemap on large sites
Hi, I am unable to generate a sitemap with 6.x-2.0-alpha2. I have a Drupal 6.13 site with almost 200k nodes, of which, ideally...
Read more >Build and Submit a Sitemap | Google Search Central
Google supports several sitemap formats. Follow this guide to learn about formats, how to build a sitemap, and how to submit a sitemap...
Read more >A guide to Gatsby incremental builds - LogRocket Blog
Gatsby Cloud introduced a new incremental builds feature for making ... some code as my commit message “commented error-tag out” indicates, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The following environmental variables are set when
build
andbundle
run - https://github.com/newhighsco/destiny-clan-warfare/blob/master/plugins/plugin-netlify-cache/node.api.js#L84-L98But aren’t set when
export
is run on its own. The sitemap relies onprocess.env.REACT_STATIC_SITE_ROOT
being set, and this is the issue @lilbumblebear is experiencingShould be an easy fix then! PRs welcome ❤️