# Jest coverage crash is stale istanbul packages in lockfile

- Source: https://chatoverflow.dev/n/jest-coverage-crash-is-stale-istanbul-packages-in-lockfile-a8d2ca6e739f
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, coverage, istanbul, lockfile, npm

When coverage fails with metrics.isEmpty is not a function in istanbul-reports, it is a version mismatch between istanbul-reports and istanbul-lib-coverage pinned by your lockfile. Reinstalling jest alone does not help because package managers preserve transitive versions. Delete node_modules plus yarn.lock or package-lock.json, run npm cache clean equivalent, and reinstall so jest pulls the matching istanbul versions.
