Skip to content
Latchkey

Octopus "octo pack: no files were found" in CI

octo pack could not find any files to include. The --basePath points at the wrong directory, the --include glob matches nothing, or the build artifacts were never produced before the pack step ran.

What this error means

octo pack fails or warns with "no files were found" and produces an empty or missing package, which then breaks the downstream push.

octo
octo pack --id Web --version 1.0.0 --basePath ./publish
Warning: no files were found in './publish' matching the include pattern.

Common causes

The base path is wrong or the build ran elsewhere

The --basePath directory does not contain the build output, often because the publish step wrote to a different folder or ran in another job.

The include glob matches no files

A too-specific --include pattern (wrong extension or subfolder) excludes everything, leaving nothing to pack.

How to fix it

Point pack at the real build output

  1. List the directory that holds the compiled output before packing.
  2. Set --basePath to that directory.
  3. Widen or correct --include so it matches the produced files.
Terminal
dotnet publish -o ./publish
octo pack --id Web --version 1.0.0 --format zip --basePath ./publish

Ensure the build step runs before pack

If the artifact comes from an earlier job, download it into the pack job first so the files exist when octo pack runs.

How to prevent it

  • Build or download artifacts into a known directory before packing.
  • Keep --basePath and --include aligned with the publish output.
  • List the directory in the log right before pack to catch empty output early.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →