bookdown-demo icon indicating copy to clipboard operation
bookdown-demo copied to clipboard

Build Book returns Error in vapply...

Open rccline opened this issue 3 years ago • 1 comments

I cloned bookdown-demo. I opened index.Rmd and I ran Build Book which returned the following errors:

Tweaking _book/index.html Tweaking _book/intro.html Tweaking _book/literature.html Tweaking _book/methods.html Error in vapply(footnotes, FUN.VALUE = character(1), function(x) { : values must be length 1, but FUN(X[[2]]) result is length 2 Calls: local ... bs4_chapters_tweak -> bs4_chapter_tweak -> tweak_footnotes -> vapply Execution halted Error: bookdown::render_book() failed to render the output format 'bookdown::bs4_book'. Execution halted

Exited with status 1.

rccline avatar Jul 18 '21 01:07 rccline

Hi,

Sorry for this misleading situation. You need the dev version of bookdown to work with current bookdown-demo template for bs4_book().

This is because we are preparing next release which contains some fixes and we already updated the bookdown-demo with example for this.

Can you install the dev version of bookdown ?

remotes::install_github("rstudio/bookdown")

Otherwise, you just need to remove the part with long footnotes examples: https://github.com/rstudio/bookdown-demo/blob/22d62e9bd7a8128960c34b5d8e99b63c0c633067/03-method.Rmd#L17-L23

Sorry for the trouble with this.

cderv avatar Jul 19 '21 08:07 cderv