-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Open
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainersThis issue has not been triaged by maintainers
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clear
oryarn clear
command. - I have tried
rm -rf node_modules yarn.lock package-lock.json
and re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
When referring to some static file in the component like:
<Link href="/static/download/file.zip">Download</Link>
everything works fine on debug version.
But when I try to do "npm run build" I get the message:
Exhaustive list of all broken links found:
- Broken link on source page path = /docs/my-page:
-> linking to /download/file.zip
I definitely see that this file exists both as "/static/download/file.zip" and as "/build/download/file.zip".
Switching from to or using "path://" instead fixes building the website, but in this case I lose broken links checking.
Reproducible demo
No response
Steps to reproduce
- Refer with Link to some existing file in static/:
<Link href="/static/download/file.zip">Download</Link>
- Run
npm run build
Expected behavior
Build successes. It should fail only if file doesn't exist.
Actual behavior
Build failed:
Exhaustive list of all broken links found:
- Broken link on source page path = /docs/my-page:
-> linking to /download/file.zip
Your environment
- Docusaurus version used: 3.9.1
- Environment name and version: Node 18
- Operating system and version: Ubuntu 20.04 LTS
Metadata
Metadata
Assignees
Labels
bugAn error in the Docusaurus core causing instability or issues with its executionAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainersThis issue has not been triaged by maintainers