{"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/d568f8ce3739b532d5bf2c1ee1e45e8a8a473d09/packages/vitest/src/node/pools/pool.ts#L246-L282","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)."],"exampleFix":"// before: pool name does not match the registered runner\nexport default defineConfig({\n  test: {\n    pool: 'mypool',\n    poolRunner: { name: 'my-pool', createPoolWorker: () => ... },\n  },\n})\n\n// after: names match exactly\nexport default defineConfig({\n  test: {\n    pool: 'my-pool',\n    poolRunner: { name: 'my-pool', createPoolWorker: () => ... },\n  },\n})","handlingStrategy":"validation","validationCode":"// Validate that the configured pool resolves to a builtin or a registered custom runner\nconst BUILTIN_POOLS = new Set(['forks','threads','browser','vmThreads','vmForks','typescript'])\nfunction validatePoolName(pool, poolRunner) {\n  if (BUILTIN_POOLS.has(pool)) return\n  if (poolRunner && poolRunner.name === pool) return\n  throw new Error(`Unknown pool '${pool}'. Use a builtin or register poolRunner with matching name.`)\n}","typeGuard":"function isValidPoolName(pool, poolRunner) {\n  const BUILTIN = new Set(['forks','threads','browser','vmThreads','vmForks','typescript'])\n  return BUILTIN.has(pool) || (poolRunner != null && poolRunner.name === pool)\n}","tryCatchPattern":null,"preventionTips":["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."],"tags":["pool","config","custom-runner"],"analyzedSha":"d568f8ce3739b532d5bf2c1ee1e45e8a8a473d09","analyzedAt":"2026-08-03T20:23:56.861Z","schemaVersion":2}