{"record":{"id":"69075794c1bb6620","repo":"vitest-dev/vitest","slug":"runner-task-worker-is-not-supported-test-files","errorCode":null,"errorMessage":"Runner ${task.worker} is not supported. Test files: ${formatFiles(task)}.","messagePattern":"Runner (.+?) is not supported\\. Test files: (.+?)\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vitest/src/node/pools/pool.ts","lineNumber":264,"sourceCode":"      case 'vmForks':\n        return new PoolRunner(options, new VmForksPoolWorker(options))\n\n      case 'threads':\n        return new PoolRunner(options, new ThreadsPoolWorker(options))\n\n      case 'vmThreads':\n        return new PoolRunner(options, new VmThreadsPoolWorker(options))\n\n      case 'typescript':\n        return new PoolRunner(options, new TypecheckPoolWorker(options))\n    }\n\n    const customPool = task.project.config.poolRunner\n    if (customPool != null && customPool.name === task.worker) {\n      return new PoolRunner(options, customPool.createPoolWorker(options))\n    }\n\n    throw new Error(`Runner ${task.worker} is not supported. Test files: ${formatFiles(task)}.`)\n  }\n\n  private getConcurrencyId() {\n    let concurrencyId: number | undefined\n\n    this.workerIds.forEach((state, id) => {\n      if (state && concurrencyId == null) {\n        concurrencyId = id\n        this.workerIds.set(id, false)\n      }\n    })\n\n    if (concurrencyId == null) {\n      throw new Error('Cannot set concurrency id because there are no valid free ids.')\n    }\n\n    return concurrencyId\n  }","sourceCodeStart":246,"sourceCodeEnd":282,"githubUrl":"https://github.com/vitest-dev/vitest/blob/1fa9837ec26533512fdcad8baebf249771bd340a/packages/vitest/src/node/pools/pool.ts#L246-L282","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":"// before\nexport default defineConfig({ test: { pool: 'thread' } }) // typo\n\n// after\nexport default defineConfig({ test: { pool: 'threads' } })\n\n// custom pool case\n// poolRunner must expose: name: 'my-pool'\n// config: test: { pool: 'my-pool', poolOptions: { myPool: { ... } } }","handlingStrategy":"type-guard","validationCode":"const BUILTIN_POOLS = new Set(['threads', 'forks', 'vmThreads', 'vmForks', 'typescript'])\nfunction poolNameIsValid(name, customPoolRunner) {\n  return BUILTIN_POOLS.has(name)\n    || (customPoolRunner != null && customPoolRunner.name === name)\n}\n// before run: if (!poolNameIsValid(project.config.pool, project.config.poolRunner)) fail fast","typeGuard":"function isBuiltinPool(name): name is 'threads'|'forks'|'vmThreads'|'vmForks'|'typescript' {\n  return ['threads','forks','vmThreads','vmForks','typescript'].includes(name)\n}","tryCatchPattern":null,"preventionTips":["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)."],"tags":["pool","worker-type","config"],"backgroundTag":null,"analyzedSha":"1fa9837ec26533512fdcad8baebf249771bd340a","analyzedAt":"2026-08-11T16:11:39.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}