grunt-istanbul icon indicating copy to clipboard operation
grunt-istanbul copied to clipboard

Fatal error when running store coverage task

Open thgil opened this issue 10 years ago • 1 comments

When trying to run a coverage task on some code I get this error:

Running "storeCoverage" task
Fatal error: Cannot assign to read only property 'prepareStackTrace' of function Error() { [native code] }

This error happens at this line in storeCoverage() https://github.com/taichi/grunt-istanbul/blob/master/tasks/helpers.js#L120

fs.writeFile(json, JSON.stringify(cov), 'utf8', this.async(as(1)));

The error seems to be coming from the nue library at https://github.com/nakamura-to/nue/blob/master/lib/nue.js#L171

thgil avatar Jun 23 '14 11:06 thgil

Strange, removing the error handling code in nue (around L171) actually lets storeCoverage finish and generates the report.

thgil avatar Jun 23 '14 16:06 thgil