Closed axel7083 closed 1 week ago
This is most likely because your file system is case-insensitive, unlike your CI
The 2nd redirect file can only be created unless the file system is case sensitive and allow both files to exist.
What would you expect to happen, for both environments, in this case?
I'd recommend against emitting twice the file. Many hosts will support serving static files in a case-insensitive fashion and just emitting lower-case redirect files should be enough.
For example Netlify:
GitHub Pages:
I think some hosts like Vercel are case sensitive. But the truth is, you shouldn't use client directs with any host that support server redirects instead.
Server redirects are always a better option, and to my knowledge only GitHub pages do not support server directs, so the only good reason to use client directs is if you deploy to GitHub Pages (or similarly very limited host), which is case insensitive.
Note docusaurus serve
is also case insensitive so if you use it for self-hosting, no need to duplicate your redirects.
For these reasons I'm going to close for now, but still curious to see what you expect from Docusaurus in this case.
I don't think we really need to fix anything here. At best we could ignore the error, or emit a more user-friendly error message.
But it looks good enough to me honestly, because you figured out that you had twice the same redirect already. The question is: why did you add twice the same redirect in the first place? Have you tried with only one redirect, and what motivated you to add a second redirect?
Thanks for the amazing explanation đź‘Ť !
I don't think we really need to fix anything here. At best we could ignore the error, or emit a more user-friendly error message.
Yes this is what I expect, having either a more friendly error, or ignore it.
But it looks good enough to me honestly, because you figured out that you had twice the same redirect already. The question is: why did you add twice the same redirect in the first place? Have you tried with only one redirect, and what motivated you to add a second redirect?
No idea; I arrived later after it was like this, and the person who did that is not here anymore.
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
When defining urls that are the same except uppercases, we are getting an error on windows machine
Reproducible demo
No response
Steps to reproduce
yarn
to install dependenciesyarn website:prod
Expected behavior
build should work the same on windows and on linux
Actual behavior
The reason is because we define the following
There is a small difference, the uppercase at
Installation
.The error only appear when building on windows, in our pipeline, no issue raised.
Your environment
Self-service