grunt-istanbul
grunt-istanbul copied to clipboard
Fatal error when running store coverage task
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
Strange, removing the error handling code in nue (around L171) actually lets storeCoverage finish and generates the report.