I had also encounterd this error message recently and found that it is often misleading.
You must have forgotten to import the most important BrowserAnimationsModule.
The problem was animating an*ngIf in the component template but I had forgotten to mention it in the @Component.animations for the component class.
animations: [myNgIfAnimation] // <-- Please Don't forget it!
If you use an animation in a template then you should also list that animation in the component's animations metadata each and every time.