Loading an R shiny app but running into issues loading libraries

66 Views Asked by At

My shiny app utilizes the randomForestSRC library. It operates fine on my own PC and in my version of R, but I am trying to upload it to an online server space where I need to manually install my apps. When I try to load this library, I get the following error message:

su: ignore --preserve-environment, it's mutually exclusive to --login.
Warning: package ‘randomForestSRC’ was built under R version 4.3.1
Error: package or namespace load failed for ‘randomForestSRC’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘htmltools’ 0.5.2 is already loaded, but >= 0.5.4 is required
Execution halted

So it appears that my htmltools library is loaded as an old version, which simply is not true. I have indeed installed the latest version of htmltools; there is no doubt about this.

What's notable is that when I try to load htmltools by itself, I then get THIS error message:

su: ignore --preserve-environment, it's mutually exclusive to --login.
Warning: package ‘htmltools’ was built under R version 4.3.0
Error in value[[3L]](cond) : 
  Package ‘htmltools’ version 0.5.2 cannot be unloaded:
 Error in unloadNamespace(package) : namespace ‘htmltools’ is imported by ‘shiny’ so cannot be unloaded
Calls: runApp ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

In other words, it is telling me that some conflict with the shiny library is preventing it from loading the latest version of htmltools. This is confusing, because I have downloaded the latest version of shiny. It is worth noting that I don't even directly load the shiny library; I load shinydashboard, shinyjs, and shinycssloaders. I have also downloaded the latest versions of all of these libraries so I am really at a loss as to why I'm still running into old version issues. Lastly, when I run this on my computer, I load all these libraries without any conflicts between them.

I can't offer any code to reproduce this since I am using proprietary code on a proprietary server. This all works fine on my own computer anyway and thus would work fine on yours too.

Any ideas on what's wrong?

0

There are 0 best solutions below