Skip to content

Inconsistent File Handling Between Development and Build Processes #10459

Open
@arbcar

Description

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • 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.
  • 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: needs more informationThere is not enough information to take action on the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions