question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Sitemap plugin fails on export

See original GitHub issue

Hi,

It seems sitemap generation via react-static-sitemap-plugin works well on yarn build but fails on yarn export giving the following error :

 Error: Trace: Error: The sitemap url prefix cannot be empty or undefined!
   

siteRoot is defined in my static.config.js

Any clues ?

Thanks !

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
julescecommented, Jul 17, 2019

I’m experiencing a related problem (I suspect). I have the REACT_STATIC_PUBLIC_PATH env variable set, and yarn build works as expected, generating the correct sitemap.xml.

However, when I run yarn export, I end up with a sitemap.xml where the siteRoot value from static.config.js is essentially missing, or treated as an empty string.

An example, under yarn build:

<url><loc>https://www.hello.com/company/</loc></url>

And yarn export:

<url><loc>/company/</loc></url>

I’ll do some further digging, and hopefully yield some more information or a pull request.

0reactions
SleeplessBytecommented, Jan 11, 2020

There is no new version released since #1352 was merged 4 days ago. Please always check CHANGELOG.md when you’re trying to figure out what’s in your version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic sitemap generation does not appear to be using the ...
Receiving this error when trying to enable dynamic sitemaps: “Dynamic sitemap generation does not appear to be using the correct rewrite rules; ...
Read more >
Common XML sitemap errors - Yoast
Are you getting an error on or about your XML sitemap? In this article, we've listed the most common XML sitemap errors, along...
Read more >
How to Fix Yoast's WordPress SEO Sitemap 404 Error
Then, go back to your WP admin page and then go to the SEO plugin > XML sitemaps, and then click the button...
Read more >
500 error when certain sitemaps are non-existant #751 - GitHub
I encountered this issue today, for me It was caused by my robots.txt file including the sitemap URL in it. The URL in...
Read more >
How to Fix a 404 Error When Viewing Your Sitemap - AIOSEO
Open the aioseo-export-settings file that was downloaded to your computer and search for “filename”. If the value is anything other than “sitemap” for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found