If you remove "2D Animation" from package manager the code doesn't compile as it's missing referenced classes. It's possible same thing is happening with other packages as well.
A nice to have is to generally whenever you are relying on some package is to have some way to check first if it's included in the project before accessing it or to have config which add/removes modules.