GitHub Actions "working-directory ... does not exist"
A step set working-directory to a path that has not been created yet. The runner tries to chdir into it before running the command and fails because the directory is absent.
What this error means
A step with a working-directory key fails before any command runs, reporting that the directory cannot be found.
github-actions
##[error]An error occurred trying to start process '/usr/bin/bash' with working directory '/home/runner/work/app/app/frontend'. No such file or directoryCommon causes
Directory not created or not checked out
The path is built by an earlier step or lives in a submodule, but checkout did not bring it in or the build step has not run yet.
Wrong relative path
working-directory is resolved relative to the workspace root; an extra or missing segment points at a nonexistent folder.
How to fix it
Verify the path exists before using it
- List the workspace to confirm the directory name and casing.
- Ensure checkout (and any generator step) runs before the step that sets working-directory.
- Correct the relative path and re-run.
.github/workflows/ci.yml
- uses: actions/checkout@v4
- run: ls -la
- name: Build frontend
working-directory: frontend
run: npm ciHow to prevent it
- Keep working-directory paths relative to the repo root and matching the actual folder.
- Create generated directories in an earlier step before any step cds into them.
Related guides
GitHub Actions container job "workdir not found"Fix the GitHub Actions error where a container job sets an --workdir option pointing at a path that does not…
GitHub Actions "pwsh: command not found" on an Ubuntu runnerFix the GitHub Actions error where a step with "shell: pwsh" fails on an Ubuntu runner because PowerShell Cor…
GitHub Actions "/usr/bin/bash: line N: command not found"Fix the GitHub Actions run-step error "/usr/bin/bash: line N: command not found" - the tool is not installed…