You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
output file name conflict when two formats targets same extension (like html and revealjs) #4583
---
title: "Presentation"
format: revealjs
---
## Slide 1
This is a presentation
## Slide 2
More contents here
report.qmd
---
title: "Report"
---
## Heading 1
This is a report
Then run quarto render. Adding format: html to report.qmd fixes this issue.
It took me a while to troubleshoot as the error message was not helpful.
🢒 quarto --version
1.2.1
🢒 lsb_release -a
No LSB modules are available.
Distributor ID: Zorin
Description: Zorin OS 16.2
Release: 16
Codename: focal
Checklist
Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
Please format your issue so it is easier for us to read the bug report.
Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
Please document the operating system you're running. If on Linux, please provide the specific distribution.
It would be ideal for quarto to issue a warning in this sort of scenario. But what's happening here is that both of your html and revealjs formats are rendering to the same output file. When you write in your _quarto.yml
you're effectively telling quarto: "render these two formats when I don't specify otherwise". So quarto will attempt to render a revealjs presentation and a webpage for every .qmd file. This confuses quarto, because they both generate .html files.
Things work when you specify a single format (like format: html or format: revealjs) because we take those to mean "render only this specific format".
As a result, when you're using this particular style in _quarto.yml, you really do need to specify a particular format at every .qmd file. We'd like to do better here and warn that multiple outputs are being generated (and so quarto will step on its own toes along the way), but it's a generally hard problem because we don't control all possible filenames.
In the end, I agree this is a bug, but it'll be very hard for us to fix it in a short to medium timeframe.
changed the title [-]ERROR: NotFound: No such file or directory (os error 2), rename[/-][+]output file name conflict when two formats targets same extension (like html and revealjs)[/+]on Sep 27, 2023
The original issue here has two formats in _quarto.yml; I'd like to point out the same bug manifesting in a different use case. Here's a MWE that fails to render:
---
title: Sample Page
format:
html: default
revealjs: default
---
# Hello world
hi there
and (as test.qmd) gives the very non-informative error
ERROR: NotFound: No such file or directory (os error 2): rename '/home/peter/teaching/ds435/test_website/test.html' -> '/home/peter/teaching/ds435/test_website/docs/test.html'
As other have said (and is indeed in the documentation, a workaround is to specify the output file, for instance:
revealjs:
output-file: test.slides.html
The fundamental problem is not using unique file extensions for each format; it might have been nice to follow jupyter's nbconvert in making revealjs output use .slides.html.
A possible solution that doesn't break backwards compatibility would be to have a top-level configuration option that lets you set the suffix so that they don't clobber each other; for instance in _quarto.yml
to either the file itself or to _quarto.yml (but if the latter, note that all files without format explicitly specified will then be rendered to slides). This seems like better advice than specifying output-file because it's a line that can be copy-pasted between files, or specified globally, without requiring file-specific changes.
It seems to me that (a) a more informative error, and (b) providing the advice to change output-ext in the documentation and maybe the error message itself would close this issue (and the many quasi-duplicates of it).
Unfortunately, in complex projects such as book/website, changing the extension tends to break links last time I checked (there is probably an issue about it).
Activity
cscheid commentedon Mar 1, 2023
It would be ideal for quarto to issue a warning in this sort of scenario. But what's happening here is that both of your
htmlandrevealjsformats are rendering to the same output file. When you write in your _quarto.ymlyou're effectively telling quarto: "render these two formats when I don't specify otherwise". So quarto will attempt to render a revealjs presentation and a webpage for every .qmd file. This confuses quarto, because they both generate .html files.
Things work when you specify a single format (like
format: htmlorformat: revealjs) because we take those to mean "render only this specific format".As a result, when you're using this particular style in
_quarto.yml, you really do need to specify a particular format at every .qmd file. We'd like to do better here and warn that multiple outputs are being generated (and so quarto will step on its own toes along the way), but it's a generally hard problem because we don't control all possible filenames.In the end, I agree this is a bug, but it'll be very hard for us to fix it in a short to medium timeframe.
Disable ms pdf for now
chaz-clark commentedon Sep 26, 2023
mcanouil commentedon Sep 26, 2023
[-]ERROR: NotFound: No such file or directory (os error 2), rename[/-][+]output file name conflict when two formats targets same extension (like html and revealjs)[/+]mcanouil commentedon Jul 14, 2025
output-filecan be set per format to avoid the issue:petrelharp commentedon Jan 5, 2026
The original issue here has two formats in
_quarto.yml; I'd like to point out the same bug manifesting in a different use case. Here's a MWE that fails to render:and (as
test.qmd) gives the very non-informative errorAs other have said (and is indeed in the documentation, a workaround is to specify the output file, for instance:
The fundamental problem is not using unique file extensions for each format; it might have been nice to follow jupyter's
nbconvertin making revealjs output use.slides.html.A possible solution that doesn't break backwards compatibility would be to have a top-level configuration option that lets you set the suffix so that they don't clobber each other; for instance in
_quarto.ymlmcanouil commentedon Jan 5, 2026
@petrelharp You mean
output-ext? https://quarto.org/docs/reference/formats/html.html#renderingpetrelharp commentedon Jan 6, 2026
Why, yes, that is what I mean!
So, here's a solution: add
to either the file itself or to
_quarto.yml(but if the latter, note that all files withoutformatexplicitly specified will then be rendered to slides). This seems like better advice than specifyingoutput-filebecause it's a line that can be copy-pasted between files, or specified globally, without requiring file-specific changes.It seems to me that (a) a more informative error, and (b) providing the advice to change
output-extin the documentation and maybe the error message itself would close this issue (and the many quasi-duplicates of it).mcanouil commentedon Jan 6, 2026
Unfortunately, in complex projects such as book/website, changing the extension tends to break links last time I checked (there is probably an issue about it).
Edit:
petrelharp commentedon Jan 6, 2026
Good to know, thanks. However, that's also a bug, so if that is fixed then this will work...