Skip to content

Vitest extension fails "No projects matched the filter: project-name" #790

@ddamiankowalski

Description

@ddamiankowalski

Describe the bug

I am trying to run the tests via VSCode using the Vitest extension, however the ouput fails with a specific error saying that the filtering projects process failed

Ouput

Error: Vitest failed to start: 
Error: No projects matched the filter "manage-users-feature".

vite config

/// <reference types='vitest' />
import { defineConfig } from 'vite';
import angular from '@analogjs/vite-plugin-angular';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';

export default defineConfig(() => ({
  root: __dirname,
  cacheDir:
    '../../../../node_modules/.vite/libs/project-name/manage-users/feature',
  plugins: [
    angular({ tsconfig: `${__dirname}/tsconfig.spec.json` }),
    nxViteTsPaths(),
    nxCopyAssetsPlugin(['*.md']),
  ],
  test: {
    name: 'manage-users-feature',
    watch: false,
    globals: true,
    environment: 'jsdom',
    include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
    setupFiles: ['src/test-setup.ts'],
    reporters: ['default'],
    coverage: {
      reportsDirectory:
        '../../../../coverage/libs/project-name/manage-users/feature',
      provider: 'v8' as const,
    },
  },
}));

Reproduction

  1. Click the green icon decorator in vscode
  2. Test does not start
  3. Output in console is generated

System Info

System:
    OS: macOS 26.5
    CPU: (8) arm64 Apple M3
    Memory: 93.42 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.14.0 - /Users/damiankowalski/.nvm/versions/node/v24.14.0/bin/node
    npm: 11.9.0 - /Users/damiankowalski/.nvm/versions/node/v24.14.0/bin/npm
    Watchman: 2025.08.25.00 - /opt/homebrew/bin/watchman
  Browsers:
    Chrome: 148.0.7778.181
    Firefox: 137.0
    Safari: 26.5

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions