webpack-contrib / istanbul-instrumenter-loader

Istanbul Instrumenter Loader
MIT License
273 stars 65 forks source link

Weird Istanbul TypeError "TypeError: Cannot read property 'start' of undefined" #16

Closed adjavaherian closed 7 years ago

adjavaherian commented 8 years ago

Any idea if this is related to the loader? Perhaps a really slow test?

15 12 2015 16:47:52.674:ERROR [coverage]: [TypeError: Cannot read property 'start' of undefined]
TypeError: Cannot read property 'start' of undefined
at /home/adjavaherian/Desktop/web-off-master/node_modules/istanbul/lib/object-utils.js:59:44
at Array.forEach (native)
at Object.addDerivedInfoForFile (/home/adjavaherian/Desktop/web-off-master/node_modules/istanbul/lib/object-utils.js:58:37)
at Object.Collector.fileCoverageFor (/home/adjavaherian/Desktop/web-off-master/node_modules/istanbul/lib/collector.js:94:15)
at /home/adjavaherian/Desktop/web-off-master/node_modules/istanbul/lib/report/text.js:210:27
at Array.forEach (native)
at TextReport.Report.mix.writeReport (/home/adjavaherian/Desktop/web-off-master/node_modules/istanbul/lib/report/text.js:208:27)
at writeReport (/home/adjavaherian/Desktop/web-off-master/node_modules/karma-coverage/lib/reporter.js:62:16)
at /home/adjavaherian/Desktop/web-off-master/node_modules/karma-coverage/lib/reporter.js:282:11
at Array.forEach (native)
at forEach (/home/adjavaherian/Desktop/web-off-master/node_modules/karma/lib/browser_collection.js:93:21)
at /home/adjavaherian/Desktop/web-off-master/node_modules/karma-coverage/lib/reporter.js:241:16
at Array.forEach (native)
at onRunComplete (/home/adjavaherian/Desktop/web-off-master/node_modules/karma-coverage/lib/reporter.js:240:15)
at null.<anonymous> (/home/adjavaherian/Desktop/web-off-master/node_modules/karma/lib/events.js:13:22)
at emitTwo (events.js:92:20)
nkbt commented 8 years ago

Must be same as #3

adjavaherian commented 8 years ago

confirmed. you have to escape all the pitching loaders like this require('!!helper!foo') until a fix is merged. thanks @nkbt

mattlewis92 commented 7 years ago

Closing as a dupe of https://github.com/webpack-contrib/istanbul-instrumenter-loader/issues/3