vitest-dev/vitest · error · Error
Runner ${task.worker} is not supported. Test files: ${format
Error message
Runner ${task.worker} is not supported. Test files: ${formatFiles(task)}. What it means
Thrown by Pool.getPoolRunner when task.worker does not match any builtin pool ('forks','vmForks','threads','vmThreads','typescript') and does not match a registered custom config.poolRunner with the same name. The worker string on a PoolTask must correspond to a pool Vitest knows how to instantiate; an unknown value means spec resolution or config produced an invalid pool assignment.
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 d568f8ce37)
Solutions
- Check the project's config.pool value — it must be one of the builtin pools or match a registered poolRunner.name.
- If using a custom poolRunner, ensure its .name exactly matches the pool string assigned to specs.
- Re-validate the workspace/project config for typos in pool or poolRunner registration.
- Report as a bug if the value is a builtin and this still fires (likely a version regression).
Example fix
// before: pool name does not match the registered runner
export default defineConfig({
test: {
pool: 'mypool',
poolRunner: { name: 'my-pool', createPoolWorker: () => ... },
},
})
// after: names match exactly
export default defineConfig({
test: {
pool: 'my-pool',
poolRunner: { name: 'my-pool', createPoolWorker: () => ... },
},
}) Defensive patterns
Strategy: validation
Validate before calling
// Validate that the configured pool resolves to a builtin or a registered custom runner
const BUILTIN_POOLS = new Set(['forks','threads','browser','vmThreads','vmForks','typescript'])
function validatePoolName(pool, poolRunner) {
if (BUILTIN_POOLS.has(pool)) return
if (poolRunner && poolRunner.name === pool) return
throw new Error(`Unknown pool '${pool}'. Use a builtin or register poolRunner with matching name.`)
} Type guard
function isValidPoolName(pool, poolRunner) {
const BUILTIN = new Set(['forks','threads','browser','vmThreads','vmForks','typescript'])
return BUILTIN.has(pool) || (poolRunner != null && poolRunner.name === pool)
} Prevention
- Double-check pool string spelling in project/workspace config.
- When registering a custom poolRunner, ensure its .name exactly matches the pool value.
- Validate config in CI before running tests.
When it happens
Trigger: A TestSpecification has pool set to an unrecognized string that is neither builtin nor a key in project.config.poolRunner (packages/vitest/src/node/pools/pool.ts:242-264). Reachable via a custom pool config name typo, a stale spec after config changes, or an internal bug assigning the pool.
Common situations: Typo in a per-project pool config; a custom poolRunner whose name does not match the pool value used on specs; version mismatch where a pool was renamed.
Related errors
- vitest/browser can be imported only inside the Browser Mode.
- You've enabled headless mode for "preview" provider but it d
- ${name}Browser name is required. Please, set `test.browser.i
- Browser Mode requires the "provider" to always be specified.
- ${name}Browser "${browser}" is not supported by the browser
AI-assisted analysis of vitest-dev/vitest@d568f8ce37 (2026-08-03).
Data as JSON: /data/errors/69075794c1bb6620.json.
Report an issue: GitHub.