Try the following method and re-install the package.
Try restarting your R session (e.g. .rs.restartR() if in RStudio)
The package might have been installed in your computer (even though it does not work). Remove it using ?remove.packages()
Error converted from warning prevents package install when dependency was built under newer R version.
Setting R_REMOTES_NO_ERRORS_FROM_WARNINGS=“false” will cause warning messages during calls to install.packages() to become errors.
Try run the following code and re-install the package.