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
- Use a valid built-in pool name: threads | forks | vmThreads | vmForks | typescript.
- For custom pools, ensure poolRunner.name exactly equals the configured pool value.
- 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
- Use a built-in pool name or ensure poolRunner.name matches the configured pool exactly.
- Spell-check pool names (threads, not thread).
- Validate per-project pool overrides (poolOptions.<project>.pool).
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
- Pool " " cannot run with "experimental.viteModuleRunner…
- vitest/browser can be imported only inside the Browser…
- vitest/browser can be imported only inside the Browser…
- Access denied to " ". See Vite config documentation for…
- All browser instances within a project must use the same…
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)