I’m having trouble with the Render button for Quarto Documents in RStudio. When I click Render, I get the following error in the Background Jobs tab (and the output is not created):
'C:/Program' is not recognized as an internal or external command, operable program or batch file.
I don’t fully understand what goes on in the background when I click Render. But from this error, I am guessing that RStudio is attempting to access a path in my Program Files directory, but it is not using quotations around the path (hence the failure at C:/Program).
A few other key pieces of information:
- I have tried this with both HTML output and PDF output and have encountered the same issue. And for reference, I am trying this with a clean qmd file (with the same content that appears when you create a new Quarto Document in RStudio).
- I am able to render the qmd file successfully using two other methods. I have successfully rendered the file by issuing commands in the Terminal tab of RStudio (
quarto render "[file name].qmd"). I have also successfully rendered the file by running
quarto::quarto_renderin an R script.
- I do not have the same problem with the Knit button for R Markdown. When I click Knit on an Rmd file, it successfully creates the output. And I can see in the Render tab of RStudio that quotations were used around file/folder paths:
"C:/Program Files/RStudio/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS sundries-20220714.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output sundries-20220714.tex --lua-filter "C:\Users\redacted\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\redacted\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in" output file: sundries-20220714.knit.md
And some background details:
- RStudio version: RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36
- Quarto version: 1.0.37
- R version: 4.2.1
- OS: Windows 11
Does anyone know how I can fix my issue with the Render button?
Thanks for your help.