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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Building a Simple CLI Calculator App in Java

Top Technical questions asked in an interview for the role of Software Engineer.

David Kopec on Twitch

5 myths about APIs that should die right now

NSQ example application in golang

An Open Banking API Can Transform Traditional Financial Services

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
Charles Stover

Charles Stover

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

More from Medium

Easy binary serialization in TypeScript

Testing Vanilla JS using Karma and Jasmine

Making Classes from Imported Modules Injectable in NestJS

How to Handle Errors in SwaggerUI