vitest-dev/vitest · error · Error

Runner is not supported. Test files: .

Error message

Runner ${task.worker} is not supported. Test files: ${formatFiles(task)}.

What it means

The pool factory switches on task.worker (threads/forks/vmThreads/vmForks/typescript) and checks a custom poolRunner by name; if none match, the worker name is unknown and it throws with the worker name and the affected files. Means the configured pool is invalid or a custom poolRunner's name doesn't equal task.worker.

Solutions

  1. Use a valid built-in pool name: threads | forks | vmThreads | vmForks | typescript.
  2. For custom pools, ensure poolRunner.name exactly equals the configured pool value.
  3. Check spelling and any per-project pool overrides (poolOptions.<project>.pool).

Example fix

// before
export default defineConfig({ test: { pool: 'thread' } }) // typo

// after
export default defineConfig({ test: { pool: 'threads' } })

// custom pool case
// poolRunner must expose: name: 'my-pool'
// config: test: { pool: 'my-pool', poolOptions: { myPool: { ... } } }
Defensive patterns

Strategy: type-guard

Validate before calling

const BUILTIN_POOLS = new Set(['threads', 'forks', 'vmThreads', 'vmForks', 'typescript'])
function poolNameIsValid(name, customPoolRunner) {
  return BUILTIN_POOLS.has(name)
    || (customPoolRunner != null && customPoolRunner.name === name)
}
// before run: if (!poolNameIsValid(project.config.pool, project.config.poolRunner)) fail fast

Type guard

function isBuiltinPool(name): name is 'threads'|'forks'|'vmThreads'|'vmForks'|'typescript' {
  return ['threads','forks','vmThreads','vmForks','typescript'].includes(name)
}

Prevention

When it happens

Trigger: task.worker resolving to a value that is none of the built-in pools and not equal to a registered custom poolRunner.name — e.g. a typo in pool config (thread vs threads), a removed/renamed pool, or a custom poolRunner registered under a different name than configured.

Common situations: Typo in pool name; custom pool runner whose `name` doesn't match the configured pool; version mismatch where a pool was renamed/removed; project-level pool config diverging from workspace.

Related errors


AI-assisted analysis of vitest-dev/vitest@1fa9837ec2 (2026-08-11). Data as JSON: /api/errors/69075794c1bb6620. Report an issue: GitHub.

Appendix: source

Thrown at packages/vitest/src/node/pools/pool.ts:264

      case 'vmForks':
        return new PoolRunner(options, new VmForksPoolWorker(options))

      case 'threads':
        return new PoolRunner(options, new ThreadsPoolWorker(options))

      case 'vmThreads':
        return new PoolRunner(options, new VmThreadsPoolWorker(options))

      case 'typescript':
        return new PoolRunner(options, new TypecheckPoolWorker(options))
    }

    const customPool = task.project.config.poolRunner
    if (customPool != null && customPool.name === task.worker) {
      return new PoolRunner(options, customPool.createPoolWorker(options))
    }

    throw new Error(`Runner ${task.worker} is not supported. Test files: ${formatFiles(task)}.`)
  }

  private getConcurrencyId() {
    let concurrencyId: number | undefined

    this.workerIds.forEach((state, id) => {
      if (state && concurrencyId == null) {
        concurrencyId = id
        this.workerIds.set(id, false)
      }
    })

    if (concurrencyId == null) {
      throw new Error('Cannot set concurrency id because there are no valid free ids.')
    }

    return concurrencyId
  }

View on GitHub (pinned to 1fa9837ec2)