Build output artifact not found at expected path

A CI step that consumes the output of a prior build step cannot find the expected artifact at the configured path.

build-output-path-mismatch medium confidence build

Matched signals

  • dist.*not found
  • build.*not found
  • target.*not found
  • output directory.*does not exist
  • No such file or directory.*dist/
  • No such file or directory.*build/
  • artifact.*not found
  • expected.*output.*path

Build output artifact not found at expected path

What this failure means

A CI step that consumes the output of a prior build step cannot find the expected artifact at the configured path. The build tool produced output at a different location than the consumer expects, or the build step failed silently without producing output.

Symptoms

Faultline looks for one or more of these log fragments:

dist.*not found
build.*not found
target.*not found
output directory.*does not exist
No such file or directory.*dist/
No such file or directory.*build/
artifact.*not found
expected.*output.*path

Diagnosis

Build output path mismatches occur when:

  1. The build tool’s output directory changed in an upgrade
  2. The CI config references a hardcoded path that differs from what the build tool actually produces
  3. A build configuration (outDir, outputPath, target_dir) was changed locally but not updated in CI scripts
  4. The build step exited non-zero but CI continued due to missing error propagation

Investigate by listing expected paths after the build step:

# Add a debug step before the consuming step
ls -la dist/ || echo "dist/ not found"
find . -name "*.whl" -o -name "*.jar" -o -name "*.tar.gz" | head -20

Fix steps

  1. First confirm the build step actually ran and succeeded:

    # Check exit code of the build step
    echo "Build exit: $?"
    
  2. Identify where the build tool actually wrote its output:

    find . -newer package.json -name "*.js" -not -path "*/node_modules/*" | head -20
    
  3. Align one of the two sides:

    • Update the build tool config to write to the expected path:

      // webpack.config.js
      output: { path: path.resolve(__dirname, 'dist') }
      
      <!-- Maven pom.xml -->
      <build><directory>${project.basedir}/target</directory></build>
      
    • Update the CI step to reference the actual output path:

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          path: target/release/mybinary   # was: dist/mybinary
      
  4. If using a multi-stage Dockerfile, ensure the COPY --from=builder path matches where the builder stage places its output.

  5. For Go: go build -o ./bin/app ./cmd/app — the -o flag controls the exact output path.

Validation

  • Add a ls -la <expected-path> step before the consuming step and confirm the artifact is present.
  • Re-run the pipeline end to end.

Why it matters

Build output path mismatches cause deploy or packaging steps to fail with misleading “file not found” errors. Because the build step itself succeeded, these failures are not obvious from the build log and require tracing back through multiple steps.

Prevention

  • Define output paths as shared variables or Make targets rather than duplicating the path string in build config and CI config.
  • Add a post-build validation step that confirms required artifacts exist before proceeding to packaging or deployment.

How Faultline detects it

Use faultline explain build-output-path-mismatch to see the full playbook.

faultline analyze build.log
faultline explain build-output-path-mismatch

Generated from playbooks/bundled/log/build/build-output-path-mismatch.yaml. Do not edit directly.

Try it on your own failed log

$ faultline analyze failed.log
Want this across every CI run? Faultline Teams tracks recurring failures across all your repos and surfaces patterns in a shared dashboard.