Have you read the Contributing Guidelines on issues?
Prerequisites
Description
I'm using v2.1.0 and I've noticed that I get an error when I want to create a production build with sitemap not set to false, the yarn run start works with no issue, but when I run yarn run build I get a build error. If I set the sitemap option to false, it builds without errors. I use it as a blog only.
Reproducible demo
No response
Steps to reproduce
git clone https://gitlab.com/chreniuc/hreniuc-dev -b failed_build
cd hreniuc-dev
yarn install
yarn run build
Expected behavior
To build successfully.
Actual behavior
I'm receiving this error:
[ERROR] Unable to build website for locale en.
[ERROR] TypeError: Invalid URL
at new NodeError (node:internal/errors:372:5)
at URL.onParseError (node:internal/url:553:9)
at new URL (node:internal/url:629:5)
at new URL (node:internal/url:626:22)
at normalizeURL (/path/node_modules/sitemap/dist/lib/utils.js:274:15)
at SitemapStream._transform (/path/node_modules/sitemap/dist/lib/sitemap-stream.js:74:87)
at SitemapStream.Transform._write (node:internal/streams/transform:184:23)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at SitemapStream.Writable.write (node:internal/streams/writable:334:10)
at /path/node_modules/@docusaurus/plugin-sitemap/lib/createSitemap.js:44:57
at Array.forEach (<anonymous>)
at createSitemap (/path/node_modules/@docusaurus/plugin-sitemap/lib/createSitemap.js:44:20)
at Object.postBuild (/path/node_modules/@docusaurus/plugin-sitemap/lib/index.js:23:72)
at /path/node_modules/@docusaurus/core/lib/commands/build.js:171:22
at Array.map (<anonymous>)
at buildLocale (/path/node_modules/@docusaurus/core/lib/commands/build.js:167:31)
at async tryToBuildLocale (/path/node_modules/@docusaurus/core/lib/commands/build.js:38:20)
at async mapAsyncSequential (/path/node_modules/@docusaurus/utils/lib/jsUtils.js:34:24)
at async Command.build (/path/node_modules/@docusaurus/core/lib/commands/build.js:73:21)
[INFO] Docusaurus version: 2.1.0
Node version: v16.15.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Your environment
Self-service
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages.Description
I'm using v2.1.0 and I've noticed that I get an error when I want to create a production build with sitemap not set to false, the
yarn run startworks with no issue, but when I runyarn run buildI get a build error. If I set thesitemapoption to false, it builds without errors. I use it as a blog only.Reproducible demo
No response
Steps to reproduce
git clone https://gitlab.com/chreniuc/hreniuc-dev -b failed_build cd hreniuc-dev yarn install yarn run buildExpected behavior
To build successfully.
Actual behavior
I'm receiving this error:
Your environment
Self-service