Skip to content
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

TypeError: Cannot read property 'start' of undefined #199

Open
adjavaherian opened this issue Dec 16, 2015 · 4 comments
Open

TypeError: Cannot read property 'start' of undefined #199

adjavaherian opened this issue Dec 16, 2015 · 4 comments

Comments

@adjavaherian
Copy link

Trying to figure out what this is all about. Not sure what exactly is being pushed into object-utils.
Any ideas? FWIW I'm using this instrumenter https://github.com/deepsweet/istanbul-instrumenter-loader

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)
@rogerwaldvogel
Copy link

Have the same problem!

@adjavaherian
Copy link
Author

See the answer here: webpack-contrib/istanbul-instrumenter-loader#16 it's a bug involving the loader termination.

@alexpatow
Copy link

Have the same problem, could you explain a bit more about the solution? Thank you!

@stianlp
Copy link

stianlp commented Nov 14, 2016

I have no idea, but removing

function feed(state = initialState, action) {
}

and replacing with:
function feed(state, action) {
if (!state) state = initialState;
}

works for me. I have no idea why, but it might have something to do with babel and default parameters...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants