I'm using Pandoc to convert a Rmarkdown document into a html-document.
rmarkdown::render('ReportTemp.Rmd', output_file = paste0('TestDocument', '_', filename_invoice, '.html'),
envir = new.env(parent = globalenv()),
run_pandoc = TRUE)
This works fine when running local in Rstudio. But when running this in a dockerized setting the knitting part seems to go fine, but then I get this weird error message.
output file: ReportTemp.knit.md
/usr/bin/pandoc +RTS -K512m -RTS ReportTemp.utf8.md --to html4 --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output Report_fake.html --email-obfuscation none --standalone --section-divs --template /usr/local/lib/R/site-library/flexdashboard/rmarkdown/templates/flex_dashboard/resources/default.html --variable 'theme:cosmo' --include-in-header /tmp/Rtmp95MPQt/rmarkdown-str179e2a9e3.html --mathjax --variable 'mathjax-url:ReportTemp_fake_files/mathjax-local/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --metadata pagetitle=DocssReportTemp.utf8.md --include-in-header /tmp/Rtmp95MPQt/file17545e146html --highlight-style pygments --include-before-body /tmp/Rtmp95MPQt/file1515f007c.html --include-after-body /tmp/Rtmp95MPQt/file15bd062c2.html
Error : pandoc document conversion failed with error 7
I can't find nothing in the pandoc-manual about this exit code 7. It simply doesn't seem to exist.
It seems to produce the correct md.-format, but fails to convert this into a html-document.
Does anyone know this code and what is going on?
I personally think it has something to do with the way pandoc is called by Rstudio and the platform R-base is running on About Pandoc & Rstudio
It seems that Rstudio has a build in older version of Pandoc (1.12.x). Does this mean that newer versions of pandoc (2.x) do not work with Rmarkdown 2.1.x?
Locally, in Rstudio I have
- R-base v3.6.3
- Platform: x86_64-w64-mingw32
- Rmarkdown v2.1;
- Knitr v1.28
- Flexdashboard V0.5.1.1
- Pandoc V2.9.2.1 (this is a seperate install, could be Rstudio uses a different version I'm not aware of).
In the docker Image I use:
- R-base v3.6.3
- Platform: x86_64-pc-linux-gnu
- Rmarkdown v2.1
- Knitr v1.28
- Flexdashboard V0.5.1.1
- Pandoc V2.5
Any help would be much appreciated!