R "pandoc not found" (rmarkdown) in CI
rmarkdown::render shells out to pandoc to convert the knit Markdown into the output format, and the pandoc executable is not on PATH. The render aborts before producing the document.
What this error means
A render or R CMD check vignette step fails with "pandoc version 1.12.3 or higher is required and was not found" or "pandoc: not found".
Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
Execution haltedCommon causes
pandoc is not installed on the runner
A minimal image ships R but not pandoc, so rmarkdown cannot find a binary to convert the document.
pandoc is present but not on PATH or RSTUDIO_PANDOC
pandoc exists in a non-standard location that rmarkdown does not search, so it reports it as unavailable.
How to fix it
Install pandoc before rendering
Add pandoc to the runner, for example with the r-lib setup-pandoc action or an OS package, before any render step.
- uses: r-lib/actions/setup-pandoc@v2
- run: Rscript -e 'rmarkdown::render("report.Rmd")'Point rmarkdown at an existing pandoc
If pandoc is installed in a custom path, set RSTUDIO_PANDOC so rmarkdown can find it.
export RSTUDIO_PANDOC=/opt/pandoc/bin
Rscript -e 'rmarkdown::render("report.Rmd")'How to prevent it
- Install pandoc as a setup step before any rmarkdown render.
- Bake pandoc into custom runner images that render documents.
- Verify
rmarkdown::pandoc_available()returns TRUE early in the job.