Skip to content
Latchkey

Vitest workspace "No projects matched the filter" in CI

Vitest workspaces (or the projects config) run multiple package configs from one root. If the workspace globs match nothing, or a --project filter names a project that does not exist, Vitest reports that no projects matched and fails.

What this error means

The run fails with "No projects matched the filter 'web'" or resolves zero projects from the workspace file, running no tests.

Vitest
Error: No projects matched the filter "web".
Available projects: node, ui

Common causes

A workspace glob matches nothing in CI

The vitest.workspace.ts glob points at package paths that do not exist in the checked-out tree, so no project config loads.

A --project filter names a missing project

CI passed --project web but the workspace defines the project under a different name, so the filter excludes everything.

How to fix it

Match workspace globs to real package paths

  1. List the projects Vitest reports as available in the error.
  2. Correct the workspace globs or the --project name to match.
  3. Re-run so at least one project resolves.
vitest.workspace.ts
import { defineWorkspace } from 'vitest/config'
export default defineWorkspace(['packages/*'])

Verify the filter against available projects

Use the exact project name Vitest lists; project names come from each project config name, not the directory.

Terminal
vitest run --project ui

How to prevent it

  • Keep workspace globs aligned with the actual package layout.
  • Give each project a stable name and filter by it.
  • Run the workspace once locally with the CI command.

Frequently asked questions

What causes ""No projects matched the filter""?
The vitest.workspace.ts glob points at package paths that do not exist in the checked-out tree, so no project config loads.
How do I fix "No projects matched the filter"?
Match workspace globs to real package paths

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card