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

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…

--

--

Staff front end engineer | Tech lead | Architect | charlesstover.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store