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.
Error: No projects matched the filter "web".
Available projects: node, uiCommon 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
- List the projects Vitest reports as available in the error.
- Correct the workspace globs or the
--projectname to match. - Re-run so at least one project resolves.
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.
vitest run --project uiHow to prevent it
- Keep workspace globs aligned with the actual package layout.
- Give each project a stable
nameand filter by it. - Run the workspace once locally with the CI command.