Matrix vector does not contain any values CI/CD Origin: Build & delivery Last updated 25 Oct 2026

GitHub Actions: Matrix vector 'node' does not contain any values / Error when evaluating 'strategy' for job

The job's strategy.matrix ended up empty — a fromJSON() expression produced no values, or a dimension is an empty list.

Exact message you may see Matrix vector does not contain any valuesError when evaluating 'strategy' for jobMatrix vector 'node' does not contain any valuesUnexpected value '' fromJSONError parsing fromJSON
Seen on: GitHub Actions

Meaning

Dynamic matrices built from another job's output fail when that output is empty, malformed, or the producing job was skipped. A static dimension with no items fails the same way. Validate the JSON, skip the matrix job with an if: when the list is empty, and print the output for debugging.

Common causes

  • fromJSON(needs.setup.outputs.matrix) with an empty or missing output
  • Producer job skipped or failed so no output exists
  • Invalid JSON (single quotes, trailing comma)
  • Empty array for a matrix dimension
  • Wrong output name between jobs

⚡ Quick fix

  1. Echo the producing job's output and validate with jq
  2. Guard the matrix job: if: needs.setup.outputs.matrix != '[]'
  3. Use include with explicit entries for small matrices

Detailed fix by platform

GitHub Actions

  1. outputs: matrix: ${{ steps.set.outputs.matrix }} and in the step echo "matrix=$(jq -c . files.json)" >> "$GITHUB_OUTPUT"

Code examples

Guarded dynamic matrix

yaml
jobs:
  setup:
    runs-on: ubuntu-latest
    outputs: { matrix: ${{ steps.m.outputs.matrix }} }
    steps:
      - id: m
        run: echo 'matrix={"node":["18","20"]}' >> "$GITHUB_OUTPUT"
  test:
    needs: setup
    if: ${{ needs.setup.outputs.matrix != '' }}
    strategy:
      matrix: ${{ fromJSON(needs.setup.outputs.matrix) }}
    runs-on: ubuntu-latest
    steps:
      - run: echo node ${{ matrix.node }}

How to diagnose

  1. Output — What does the setup job output?
  2. JSON — Valid and non-empty?
  3. Needs — Is the producer job run?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

API rate limit exceeded — GitHub Actions: HttpError: API rate limit exceeded for installation ID 123456 / secondary rate limit (CI/CD)API rate limit exceed…Cache not found / Unable to reserve cache — GitHub Actions: Cache not found for input keys: npm-Linux-abc123 / Failed to save: Unable to reserve cache with key, another job may be creating this cache (CI/CD)Cache not found / Una…Credentials could not be loaded — GitHub Actions: Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers (CI/CD)Credentials could not…Invalid workflow file — GitHub Actions: Invalid workflow file: .github/workflows/ci.yml#L12 — You have an error in your yaml syntax on line 12 (CI/CD)Invalid workflow fileUnable to download artifact — GitHub Actions: Error: Unable to download artifact(s): Artifact not found for name: build (CI/CD)Unable to download ar…Unable to process file command — GitHub Actions: Error: Unable to process file command 'output' successfully. Invalid format 'x' (CI/CD)Unable to process fil…Unrecognized named-value — GitHub Actions: Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.API_KEY (CI/CD)Unrecognized named-va…Matrix ve…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.