New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception while collecting coverage metrics #207
Comments
same here |
+1 :-( |
Hi Guys, I stumbled across this error in my project last week. What is interesting, is the intermittent nature of this issue - it affected my copy of the code base and some other guys' in my team, yet there were people not experiencing this bug at all. Moreover, when I purged all node_modules directories, all lock files, build and coverage folders, after These are my observations:
So why no functions were hit by coverage? In my case, it was caused by an ES6 arrow notation of function in the file's export. It was basically something like:
when I changed it to the Temporary solutions I tried:
Hope it helps. |
Thanks for your hints and sorry for not answering for quite some time. In the light of the new version of nyc, I gave another shot at fixing that crash. Things I tried in the meantime, that were unsuccessful:
While the new version did not solve our issue, I dug into the docs of Babel-Plugin-Istanbul and this seemed to do the trick. Until the point nyc stopped working in our setup, we didn't need to bybass Babel instrumentation in the context of istanbul. Now that seems to be necessary.
Now the coverage generation works again! Your temporary solution of using ES5 functions instead of arrow functions, may point in that direction as well. How do you deal with babel instrumentation? |
Closing as it works for me now. |
Coming to this in 2020: {
"require": ["@babel/register"]
} |
Hi,
I am encountering a crash of
nyc
when collecting code coverage (looking at coverage from Jest and Cucumberjs) when executing$ nyc report --reporter=lcov
I am using
"nyc": "12.0.2",
The following exception is raised
This only occurs when executing this in an Gitlab CI environment based on an node:8 Docker image.
If I run this locally everything is fine.
I doublechecked the source mentioned in the stacktrace, but I am afraid I cannot get my head around it: Somehow the
meta
object is undefined where it shouldn't be.Any idea what I could be doing wrong here?
Thanks for your help!
The text was updated successfully, but these errors were encountered: