I got an issue quite close to what you had there. But in my case I was just doing a typo while trying to access a json. Also, if you try to get into a variable that is not initialized yet, the error will be thrown.
Take a look where in your code you tried to access a property of an object just like: "blablabla.install".
By this, you would get this error thrown just like I did.