Hi @Tahira,
The {gganimate} package has undergone significant changes since its earlier releases and the current way of using the package is very different from its original API. The changes were so drastic that it has broken old code and anyone who wants to use {gganimate} must adopt the new system.
Much more details about this change and the modern API can be found here.
EDIT: I should point out that if you REALLY want to use the old API (which I would strongly discourage), you can install an older version of the package which is compatible with your code.
remotes::install_github("thomasp85/gganimate@v0.1.1")