Building a bookdown project and getting a subscript our of bounds error

I'm workign on a W10 computer, with latest versions or RStudio, R, pandoc (installed via chocolatey) and tinytex.

I was trying to compile a book project, and it kept kicking an error at me. So to isolate, I downloaded the bookdown-demo project and tried to compile that. Same error. So I assume it's somethign in my setup.

Running the Build All in the RStudio IDE eventually kicks back the following.

==> rmarkdown::render_site(encoding = 'UTF-8')

Error in strsplit(info, "\n")[[1]] : subscript out of bounds
Calls: <Anonymous> ... <Anonymous> -> find_pandoc -> lapply -> FUN -> get_pandoc_version
In addition: Warning message:
In system(paste(shQuote(path), "--version"), intern = TRUE) :
  running command '"C:/PROGRA~3/chocolatey/bin/pandoc.exe" --version' had status 65535
Execution halted

Exited with status 1.

How can I troubleshoot this?

Running rmarkdown::find_pandoc() makes R run for a couple of minutes (literally), so long, in fact, that I had to interrupt the process. R told me that it had difficulty interrupting the child process.

Which version of pandoc and Rmarkdown are you using ?

Can you check in your terminal that this works (I assume chocolatey put pandoc in the PATH)

pandoc --version

Try the full path instead if pandoc is not in the PATH.

I suspect the error from R comes from an error with pandoc. Based on the result of the above, I can't look into it more.
Thanks!

Had to force a reinstall of pandoc, but after that, the bookdown-demo project built fine. Now back to the source of the book I really wanted to build, where I'm gettting a different error… :man_shrugging:t2:

1 Like

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.