Build Book No Longer Works?

I have a bookdown book I've been work on at my office for several months. Recently however, the "Build Book" radio button no longer works in the RStudio IDE. It seems similar to this issue

The error I receive is

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

Error in rmarkdown::render_site(encoding = "UTF-8") : 
  No site generator found.
Execution halted

Exited with status 1.

I suspect IT might have done something behind the scene possibly with our PATH. As I'm not the only person experiencing the problem suddenly.

My path is

> Sys.getenv('PATH')
[1] "C:\\Program Files\\R\\R-3.5.1\\bin\\x64;C:\\Rtools\\bin;c:\\Rtools\\bin;c:\\Rtools\\mingw_32\\bin;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\SASHome\\x86\\Secure\\ccme4;C:\\Program Files\\SASHome\\Secure\\ccme4;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\MiKTeX 2.9\\miktex\\bin\\x64\\;C:\\Program Files\\Internet Explorer;C:\\Program Files\\Microsoft Office\\Office14\\;C:\\Program Files (x86)\\Intel\\iCLS Client\\;C:\\Program Files\\Intel\\iCLS Client\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\SASHome\\x86\\Secure\\ccme4;C:\\Program Files\\SASHome\\Secure\\ccme4;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Users\\bdavis07\\AppData\\Local\\Programs\\Git\\cmd"

Any ideas on what I need to do to be able to knit my report again?

RStudio Version: 1.1.456
R Version: 3.5.3

Thanks,

Brian

2 Likes

is C:\\Program Files\\R\\R-3.5.1\\bin\\x64 the right path for your R executable?

1 Like

That's the confusing part. Those are all the valid paths and running

bookdown::render_book("index.Rmd", "bookdown::gitbook")

in the RStudio R Console renders the report.

2 Likes

The error from render_site() says that it can't find a site generator. Does the YAML header of your index.Rmd file contain an entry for the bookdown site generator?

site: bookdown::bookdown_site

For reference, here is the relevant line from the bookdown-demo.

3 Likes

I'm also having this problem. Specifically, the Build Book button now reads "Build Website". There's also no option for selecting Bookdown in the Configure Build menu.

When I run rmarkdown::render_site(encoding = 'UTF-8') I get the same error as @briandavisstats

site: bookdown::bookdown_site is included in the bookdown yaml header

1 Like

It would help if you could share a reproducible example (e.g. a project on GitHub that exhibits this issue)

2 Likes

@briandavisstats I did have success using rmarkdown::render("your_file.rmd", output_format = "all") rather than rmarkdown::render_site() or bookdown::render_book(), which both failed for me. My build button still reads "Build Website" though.

@kevinushey here's the repo in question. I'm building from individual files in /docs

Thank you!

1 Like

For rmarkdown::render_site(), this line must appear in the YAML header of the index.Rmd file. This is why the error states that it can't find the site generator.

From looking at your repository, it appears that you are using the file named index.Rmd to be a simple HTML page that then links to the bookdown chapters. I don't think this will work with the standard render_site() approach.

One option would be to use a custom build script. You can specify exactly what you want to run, e.g. something like:

rmarkdown::render("docs/index.Rmd")
bookdown::render_book("docs/")

Then you can configure the RStudio build tools to use your custom script to build your site (Build -> Configure Build Tools...) instead of using render_site().

Here's an explanation from Yihui on StackOverflow on the relationship between rmarkdown::render_site() and bookdown::render_book().

2 Likes

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