I am using Quarto and trying to create a PDF. When I render the PDF for the first time everything is fine. However, when I made a change and tried to render the PDF a second time I got the following error:
restricted \write18 enabled.
entering extended mode
dvipdfmx:fatal: Unable to open "AWS_Architecture.pdf".
No output PDF file written.
compilation failed- error
I have found that if I rename the .qmd file that fixes it, but that is not ideal (e.g. AWS_Architecture.qmd --> AWS_Architecture2.qmd). Even when I delete all of the files in the folder and start over using the same original name "AWS_Architecture.qmd", I still get the error and the PDF does not create.
Looking into the logs I found this.
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
Error 1 (driver return code) generating output; file AWS_Architecture.pdf may not be valid.
Below is the basic code for reference, nothing special.
---
title: "AWS Architecture"
format: pdf
---
## AWS Architecture
![](images/AWSArchitecture.png)
I believe that the error was arising because I was working out of Google Drive for desktop folder. This error does not occur when the working directory is set to a local folder on the PC.