facebook / facebook/docusaurus

Inconsistent File Handling Between Development and Build Processes

Aperta
#10,459 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug status: needs more information
Lingua principale
TypeScript
Stelle
66.2k
Fork
10k
Merge medio
1g 3h
PR unite (30g)
52

Descrizione

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#issues).

### Prerequisites

- [X] I'm using the latest version of Docusaurus.
- [X] I have tried the `npm run clear` or `yarn 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.
- [X] I have read the console error message carefully (if applicable).

### Description

We're experiencing inconsistent behavior with file handling between our development and build processes. Specifically, a file placed in the static/apiHtmlOutput/ directory is not consistently accessible across different build and start commands.

### Reproducible demo

_No response_

### Steps to reproduce

1) Create a file to static/apiHtmlOutput/nextPosServer.html
2) Run yarn start - The file is accessible (working as expected)
3) Run yarn build && yarn serve- The file is accessible (working as expected)
4) Run yarn start again - The file is not found (unexpected behavior)
5) Rename the file during the dev process - The file becomes accessible again

### Expected behavior

The file should be consistently accessible across all build and start processes, without needing to move it during development.

### Actual behavior

The file is only consistently accessible after a build process or when moved during development. Running yarn start alone after step yarn serve fails to locate the file.

### Your environment

- Docusaurus version used: latest

### Self-service

- [ ] I'd be willing to fix this bug myself.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.