Error while knitting r-markdown document to PDF, HTML or Word

Details of OS and RStudio Version:

MacOS Catalina 10.15.4
RStudio 1.2.5033

The problem is with knitting rmd document into PDF file. When I press knit, I get the following error:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
object 'vI' not found
Calls: :: ... asNamespace -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted

I have installed all the necessary packages- knitr, shiny, yaml and others.
I have also downloaded latest version of MacTex.

If anyone can help, I'll be very grateful!

This is often the sign that one of the package can be loaded and its installation is corrupted.
As you got it when knitting, you can try to identify the culprit by loading each package that rmarkdown require and see which has an issue

tools::package_dependencies("rmarkdown", recursive = TRUE)
#> $rmarkdown
#>  [1] "tools"     "utils"     "knitr"     "yaml"      "htmltools" "evaluate" 
#>  [7] "base64enc" "jsonlite"  "mime"      "tinytex"   "xfun"      "methods"  
#> [13] "stringr"   "digest"    "Rcpp"      "rlang"     "highr"     "markdown" 
#> [19] "glue"      "magrittr"  "stringi"   "stats"

Created on 2020-04-20 by the reprex package (v0.3.0)

Hope it helps

Thank you for the response!

However, I just reinstalled R and Rstudio and it solved the problem

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.