vitest-dev/vitest · error · Error
the blobs in "${blobsDirectory}" were generated by a differe
Error message
the blobs in "${blobsDirectory}" were generated by a different version of Vitest. Expected v${currentVersion}, but received v${blobs[0].version} What it means
Thrown by `readBlobs` (blob.ts:157) when all blob files share one version but that version differs from `currentVersion` (the version of the Vitest process performing the merge). Because the merge step must deserialize and rehydrate blob structures into the current process, the formats must match exactly; a mismatch is rejected even though the blobs are internally consistent.
Source
Thrown at packages/vitest/src/node/reporters/blob.ts:157
return { version, files, errors, coverage, file: filename, executionTime, environmentModules, transformTime }
})
const blobs = await Promise.all(promises)
if (!blobs.length) {
throw new Error(
`vitest.mergeReports() requires at least one blob file in "${blobsDirectory}" directory, but none were found`,
)
}
const versions = new Set(blobs.map(blob => blob.version))
if (versions.size > 1) {
throw new Error(
`vitest.mergeReports() requires all blob files to be generated by the same Vitest version, received\n\n${blobs.map(b => `- "${b.file}" uses v${b.version}`).join('\n')}`,
)
}
if (!versions.has(currentVersion)) {
throw new Error(
`the blobs in "${blobsDirectory}" were generated by a different version of Vitest. Expected v${currentVersion}, but received v${blobs[0].version}`,
)
}
// Restore module graph
const projects = Object.fromEntries(
projectsArray.map(p => [p.name, p]),
)
blobs.forEach((blob) => {
Object.entries(blob.environmentModules).forEach(([projectName, modulesByProject]) => {
const project = projects[projectName]
if (!project) {
return
}
modulesByProject.external.forEach(([id, externalized]) => {
project._resolver.externalizeCache.set(id, externalized)View on GitHub (pinned to d568f8ce37)
Solutions
- Run the merge step with the exact same Vitest version that wrote the blob files.
- Upgrade (or downgrade) the Vitest used to write the blobs to match the merging process, then regenerate.
- Install Vitest locally in the project so both CI and local use the same binary (`npx vitest --merge-reports`).
Example fix
# before: versions differ vitest --reporter=blob # v3.0.0 in CI vitest --merge-reports dir # v3.1.0 locally # after: match versions npx vitest@3.0.0 --merge-reports dir
Defensive patterns
Strategy: validation
Validate before calling
import { readdirSync, readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { parse } from 'flatted'
import { version } from 'vitest/package.json'
const blobVersion = (parse(readFileSync(resolve(blobsDirectory, readdirSync(blobsDirectory)[0]), 'utf-8')) as any[])[0]
if (blobVersion !== version) throw new Error(`Merge Vitest v${version} != blob v${blobVersion}`) Prevention
- Use the same locally-installed Vitest (`npx vitest`) for both writing and merging blobs.
- Pin the Vitest version in CI and locally.
- After upgrades, regenerate all blobs before merging.
When it happens
Trigger: Generating blobs with Vitest 3.0.0 and running `vitest --merge-reports` with Vitest 3.1.0; a local merge run using a globally installed `vitest` whose version differs from the one used in CI to write the blobs.
Common situations: Local/global Vitest version drift; CI wrote blobs with one version and the merge step uses another; upgrading Vitest between the blob run and the merge run.
Related errors
- vitest.mergeReports() requires all blob files to be generate
- vitest.mergeReports() expects all paths in "${blobsDirectory
- vitest.mergeReports() expects all paths in "${blobsDirectory
- vitest.mergeReports() requires at least one blob file in "${
- Blob reporter is not supported in watch mode
AI-assisted analysis of vitest-dev/vitest@d568f8ce37 (2026-08-03).
Data as JSON: /data/errors/78ed63671e8c5c01.json.
Report an issue: GitHub.