I had a simple shell script that ran the following:
Rscript -e 'rmarkdown::render("index.Rmd")'
After updating to macOS Catalina (10.15) I started getting the following error:
Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
However, if I knit
index.Rmd directly in RStudio, it works fine. And, when I check the pandoc version I get:
rmarkdown::pandoc_version()  ‘2.3.1’
But, if I run the following in terminal I get:
Rscript -e 'rmarkdown::pandoc_version()' NULL
Again, I can knit the file directly in RStudio, but I'm curious why my shell script stopped working and if anyone knows how to fix it.
I also posted this question on SO here.