Some folders of React app not uploading correctly


I’m not quite sure what’s going on but we have coverage uploading from Google Cloud Build. Everything uploads correctly except some components in our React app that get put automatically to the top level rather than nested in the folders that they should be in. I don’t understand why most of the file paths are right but some files get placed at the top level. Has anyone else ever seen this before?


Private repo


MacOS, Chrome 80 – although I don’t think this matters. It’s a React app, built in Google Cloud Build and tested with jest. The specific command I’m running is:
jest --coverage --collectCoverageFrom='["src/**/*.ts(x)"]'

Additional information

This does NOT happen when I’m running this from my local machine, only from Google Cloud Build. It’s really weird (and yes packages and all that are the same between the two environments).

Hi Joel, would you be able to provide a commit SHA for this? Another workaround would be to apply path fixing ( in your codecov.yml

We actually figured it out – it was bugs in how paths were determined in Jest 25.1.x. We upgraded and it broke lots of stuff, especially importing from Google Cloud Build. Downgrading to 24.x unbroke us and then the bugs seemed to have been fixed in Jest 25.2.x. We also moved off of GCB and onto CircleCI for builds and haven’t had any issues since.

1 Like

Awesome! Glad to hear!