Resolving “Invalid file coverage object, missing keys, found:data” for NYC

Charles Stover
2 min readDec 29, 2021

If you are merging two NYC coverage reports, for example your Cypress and your Jest coverage reports, you may encounter the cryptic error message: Invalid file coverage object, missing keys, found:data.

There are a lot of moving parts to a coverage report: Babel, Istanbul, Cypress, Jest, NYC, Webpack, and the various modules that intertwine them. Which dependency needs adjustment?

This error is a result of babel-plugin-istanbul and/or istanbul-lib-coverage being different…