What exactly do you mean by "the UI package"? If you're talking about Unity UI, I installed it and still nothing. I have both UI and UIElements built-in and enabled.
Viewing post in 2D Top down controller for Unity comments
I mean that if you remove "using UnityEngine.UI" from the file that use the type "Slider" it will cause issues either way because it's the namespace that contains the "Slider" type.
Did you try to install my package on a new project? If you have Unity UI installed it should work. But it seems to be a common issue maybe you can find more info on how to solve that here https://forum.unity.com/threads/solved-the-type-or-namespace-ui-does-not-exist-i...