I've been struggling with this for 6 weeks with intermittent success. After working with rmarkdown all morning on my W10 laptop, I shut down and restarted in another office - I do this everyday. When I restarted RStudio, rmarkdown stopped compiling to pdf. The HTML works fine. The gist of the error message was that pdflatex.exe can't be found. I'd had this issue 6 weeks ago after ~4 years of successful rmarkdown use every day and thought it was fixed. I'm using the basic .rmd template and all the defaults that RStudio wants. The specific error message is below. I've gone through several rounds of un/reinstalling rmarkdown, miktex, tinytex, etc. with appropriate restarts/reboots in between with no luck. I really like rmarkdown/bookdown and I want to keep using it but deadlines are approaching and I'm dead in the water. Can anyone please help? Is there a simple set of instructions on how to (re)install so this will work?
R 3.6.2, RStudio 1.2.5033 and the latest rmarkdown, tinytex (from github - installed w/o comment), and Miktex 2.9.
Error: Failed to compile Tester.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
In addition: Warning messages:
1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\David Stevens\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64\pdflatex.exe -halt-on-error -interaction=batchmode "Tester.tex"'
2: In system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\David Stevens\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Execution halted