Conan "conanfile.txt not found" in CI
Conan looked in the current directory for a conanfile.txt or conanfile.py and found neither. In CI this is almost always a wrong working directory, a path typo, or a file that was not checked out.
What this error means
conan install fails immediately with "ERROR: Conanfile not found, in <path>". No dependency is even attempted because there is nothing to read.
ERROR: Conanfile not found, in /home/runner/work/app/app
It should be one of: conanfile.py, conanfile.txtCommon causes
The step runs from the wrong directory
The conanfile lives in a subdirectory (for example cpp/), but the step calls conan install . from the repo root where no conanfile exists.
The file was not checked out or is git-ignored
A sparse or shallow checkout, or a conanfile left out of version control, means the file is absent on the runner.
How to fix it
Point conan at the conanfile directory
Pass the directory (or file) that actually contains the conanfile.
conan install cpp/ --build=missing
# or run from that directory
conan install path/to/conanfile.txtConfirm the file is present on the runner
- Add a
lsof the expected directory before the conan step to verify the file exists. - Ensure the checkout includes the conanfile (no sparse-checkout exclusion).
- Set the step
working-directoryto the folder that holds the conanfile.
- run: conan install .
working-directory: cppHow to prevent it
- Set an explicit
working-directoryfor the conan step. - Verify the conanfile is committed and not excluded by sparse checkout.
- Reference the conanfile path directly rather than relying on the current directory.