Post

Conflict in htmltools versions between Seurat and renv

renv (version 1.0.3) uses htmltools version 0.5.6.1, but Seurat v5 uses htmltools version 0.5.7. When I initiate a renv project and then install Seurat, I encounter an issue as:

1
2
3
4
5
6
7
8
9
/opt/miniconda3/envs/rstudio/lib/R/bin/R --vanilla -s -f '/tmp/RtmphjlHaW/renv-install-1be90932ef38f5.R'
================================================================================

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace htmltools 0.5.6.1 is being loaded, but >= 0.5.7 is required
Calls: loadNamespace -> namespaceImport -> loadNamespace
Execution halted

Error: error testing if 'htmlwidgets' can be loaded [error code 1]

My solution is as below:

1
2
3
4
5
renv::init(restart=FALSE)
renv::install("htmltools")
renv::snapshot()
renv::restore()
renv::install("Seurat")

After reloading the right version of htmltools, I can install Seurat v5 without any problems.

This post is licensed under CC BY 4.0 by the author.