I'm trying to build a website with pkgdown so I ran pkgdown::build_site()
.
This throws the following error:
Building article 'index.html'
Error: pandoc document conversion failed with error 2
There was a similar problem on SO but the answer didn't solve my issue.
My guess was that the problem was in the header of my vignette which currently is:
output:
rmarkdown::html_vignette:
smart: false
toc: true
I tried changing it to:
output: rmarkdown::html_vignette
as it is used in the pkgdown's vignette. When I used that code, I got an error and the vignette did not build.
--smart/-S has been removed. Use +smart or -smart extension instead. For example: pandoc -f markdown+smart -t markdown-smart. Try pandoc.exe --help for more information. Error: pandoc document conversion failed with error 2 In addition: Warning message: running command '"C:/PROGRA~2/Pandoc/pandoc" +RTS -K512m -RTS Introduction.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc23e071f76af6.html --smart --email-obfuscation none --self-contained --standalone --section-divs --template "C:\Users\E\Documents\R\win-library\3.4\rmarkdown\rmd\h\default.html" --highlight-style pygments --css "C:\Users\E\Documents\R\win-library\3.4\rmarkdown\rmarkdown\templates\html_vignette\resources\vignette.css" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"' had status 2 Execution halted
I changed the header as suggested here to:
output:
html_document:
smart: false
This header knits a vignette but I still get the same pandoc error when using build_site()
.
Pandoc is version 2.0. sessionInfo()
returns:
R version 3.4.1 (2017-06-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
LC_TIME=English_United Kingdom.1252attached base packages: stats graphics grDevices utils
datasets methods baseother attached packages: pkgdown_0.1.0.9000 devtools_1.13.2
loaded via a namespace (and not attached): MASS_7.3-47
compiler_3.4.1 magrittr_1.5 R6_2.2.2 tools_3.4.1
withr_1.0.2 roxygen2_6.0.1 Rcpp_0.12.12 memoise_1.1.0 xml2_1.1.1 stringi_1.1.5 stringr_1.2.0 digest_0.6.12
commonmark_1.2 rlang_0.1.1.9000
Any ideas how to fix it?
EDIT:
I ran the whole thing on Ubuntu and I managed to make it work (see the repo). Still don't know what was causing the issue. Here is the output of sessionInfo()
:
R version 3.3.3 (2017-03-06) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.2 LTS
locale:
LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C
LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=Cattached base packages: stats graphics grDevices utils
datasets methods baseother attached packages: pkgdown_0.1.0.9000 devtools_1.13.1
loaded via a namespace (and not attached): MASS_7.3-45
magrittr_1.5 R6_2.2.2 tools_3.3.3 withr_2.0.0
roxygen2_6.0.1 Rcpp_0.12.12 memoise_1.1.0 xml2_1.1.1
stringi_1.1.2 stringr_1.2.0 digest_0.6.12 commonmark_1.2 rlang_0.1.1
pkgdown::build_home()
to see if you have the same error. – F. Privébuild_home()
but I think it's the same underlying reason for both README and vignette. I built the website on Ubuntu, pulled the repo from GitHub to Windows, then tried to build a website again, but it failed. – epo3# some title
) at the beginning of your README file. – F. Privé