Sitemap is not generated
Closed this issue · 4 comments
When attempting to generate the sitemap from a crawl, the following error is written to the console:
Done crawling
{ [Error: ENOENT, open 'public/sitemaps/sitemap_www.google.com.xml']
errno: 34,
code: 'ENOENT',
path: 'public/sitemaps/sitemap_www.google.com.xml' }
Hey Rob, I believe this happens when you set to create a sitemap, but the "sitemaps" directory does not exist. You can create the folder from the command line in the root of the project via:
$ mkdir public/sitemaps
I hope that works for you.
as soon as i added the issue i tried that and saw that it worked. I submitted a pull request that will generate the directory if it does not exist if you are interested
Great. I believe I had this same issue. I think it would be great for the folder to either be in the project, or like your pull request does, create it on the fly.
Yup, good job :) I just changed fs.mkdir to fs.mkdirSync. But it actually would be better to move all subsequent code into mkdir's callback.