Problem Error Message in R Studio

Ok, so I've been using r studio for a while now and never encountered an error message like this. I tried uninstalling and reinstalling plotly but nothing is working. This is also happening to a couple other packages as well. Any solutions?

Thanks!

Error: package or namespace load failed for ‘plotly’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
namespace ‘cli’ 3.4.1 is already loaded, but >= 3.6.1 is required

try

install.packages("cli")

and sewe if that helps.

I initially tried this but it still gave me the same error message.

Not sure it will help, but what does

packageVersion("cli")

say?

it says 3.4.1

I assume it needs to be updated but when I try and use install packages for it nothing changes.

Try deleting cli and then re-installing.

Reboot, restart R & RStudio . Make sure "cli" is not automattically loading and try @ startz's advice.

To check that you are not loading "cli" accidentally run

installed.packages()[names(sessionInfo()$otherPkgs), "Version"]

This worked! Thanks!