Solution to Angular - Error: tree.branch is not a function

After getting to grips to angular, and getting so used to it's CLI; which helps accelerates some processes. it can be very weird when something working so consistently before suddenly. I experienced this error today when trying to generate a new component in my project....