Picture of Ben Simons
Uncaught TypeError: Cannot read property 'model' of undefined
by Ben Simons - Wednesday, 2 March 2016, 10:49 AM
 

I am getting this typeError on my course, does anyone know what it might be caused by?

I have attached an image of the console log.



Picture of Oliver Foster
Re: Uncaught TypeError: Cannot read property 'model' of undefined
by Oliver Foster - Wednesday, 2 March 2016, 11:47 AM
 

You're trying to use a component which isn't installed. Might be worth checking which components you're using in your json (_component attribute) vs which are installed.

Or one of your components is missing the _component attribute in the json?

I'll get a good error message written, apologies for the random error.

Seeing as you're in the debugger already, it might be worth looking at which json._component is failing. Might give you a hint

Ollie.

Picture of Matt Leathes
Re: Uncaught TypeError: Cannot read property 'model' of undefined
by Matt Leathes - Wednesday, 2 March 2016, 11:46 AM
 

It's most likely that you're trying to use a component that isn't installed - or that something is wrong in the .json

It should be handling this more gracefully than it is though, we'll get that fixed.

Picture of Tom Taylor
Re: Uncaught TypeError: Cannot read property 'model' of undefined
by Tom Taylor - Wednesday, 2 March 2016, 11:53 AM
Picture of Tom Taylor
Re: Uncaught TypeError: Cannot read property 'model' of undefined
by Tom Taylor - Wednesday, 2 March 2016, 11:55 AM
 

I've literally just merged a fix for this, so you'll get a more useful error message if you encounter this issue after the next release :)

Picture of Ben Simons
Re: Uncaught TypeError: Cannot read property 'model' of undefined
by Ben Simons - Thursday, 3 March 2016, 11:21 AM
 

Cheers guys for the quick response, absolutely kicking myself that I didn't figure this one out on my own.