Repository navigation
Description
Bug description
In my _quarto.yml file, if I add these options:
format:
html:
code-copy: true
theme: cosmo
css: styles.css
+ revealjs:
+ code-line-numbers: falseI get the following error
ERROR: NotFound: No such file or directory (os error 2), rename '/Users/hamel/github/embed-debug-quarto/1_setup/index.html' -> '/Users/hamel/github/embed-debug-quarto/_site/1_setup/index.html'
NotFound: No such file or directory (os error 2), rename '/Users/hamel/github/embed-debug-quarto/1_setup/index.html' -> '/Users/hamel/github/embed-debug-quarto/_site/1_setup/index.html'
at Object.renameSync (deno:runtime/js/30_fs.js:175:9)
at renderProject (file:///Applications/quarto/bin/quarto.js:86832:22)
at async Command.fn (file:///Applications/quarto/bin/quarto.js:90856:32)
at async Command.execute (file:///Applications/quarto/bin/quarto.js:8437:13)
at async quarto (file:///Applications/quarto/bin/quarto.js:127545:5)
at async file:///Applications/quarto/bin/quarto.js:127563:9
Steps to reproduce
I have made a minimal repro here
I am using Quarto 1.3.450
To repro, do the following:
git clone https://github.com/hamelsmu/embed-debug-quarto.git
quarto render
Expected behavior
No response
Actual behavior
No response
Your environment
- OS: Mac Ventura 13.4.1
- Quarto v
1.3.450
Quarto check output
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.450
Path: /Applications/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.12 (Conda)
Path: /Users/hamel/mambaforge/bin/python
Jupyter: 5.3.0
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.0.4
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.0/Resources/library
knitr: 1.31
rmarkdown: 2.7
[✓] Checking Knitr engine render......OK
cc: @jjallaire @cscheid
Activity
cscheid commentedon Sep 12, 2023
I can repro that here as well. Wild.
cscheid commentedon Sep 12, 2023
(I think @dragonstyle did our line numbering support)
hamelsmu commentedon Sep 12, 2023
😄 Thank you. I thought I was losing my mind! Hahaha the error didn't make any sense in relation to what I was changing, that is why it took so long for me to isolate this!
cderv commentedon Sep 13, 2023
FWIW nothing to do with
code-line-numbersas I can repro just by addingrevealjs: defaultto the format with same errorsame error message
I think what happens is a conflict betwen
htmlandrevealjsthat both aim to output some HTML files. Those two formats produce HTML so they overwrite each other, but in the case of a project rendering withoutput-dirset, the moving of file raises an error, because there is only one file to move as both formats have written to the same file.Here the detailed explanation of why this happens (not sure you are expecting this behavior)
Format metadata merging
Regarding this usage in
_quarto.yml, it will be merged with document level format, and I believe this part of the doc is importantThis means to me that if no format is defined at a document level, then both from
_quarto.ymllevel will be used. The file from the error (https://github.com/hamelsmu/embed-debug-quarto/blob/main/1_setup/index.qmd) does not get aformatkey, so I think it will be rendered toformat: htmlandformat: revealjs, and the fact that both produce html makes something trip.Setting
in the file remove the error.
Also to verify what I am saying you could try not setting a
formatin the Document level and use pdf in_quarto.ymlAfter
quarto render, a pdf file for1_setup/index.qmdwill be produced.Now add back the
format: htmlin this qmd file -> No PDF file is rendered at all. Theformatforpdfdefined in_quarto.ymlis completely ignored byquarto renderbecauseformatdefine as document level.This happens at
quarto-cli/src/command/render/render-contexts.ts
Lines 448 to 454 in ea89420
This way of merging project formats with other format metadata is the default one - only book project only consider project format only.
About the missing
index.htmlI believe this is the same as #4470 for revealjs and HTML, and close to #1929 about multiple markdown output format
Quarto currently have no way to track all this correctly and so a format producing
.htmlwill overwrite a previous one producing also a.html(Next big improvement probably - #6518)Error is from
quarto-cli/src/command/render/project.ts
Lines 328 to 333 in ea89420
and this happens for each output file.
format: htmlandformat: revealjshave the same output file, so it errors because there is only one to moveAnyhow, sorry for long post. It is not the first time this happens so now we have a written explanation until #6518 helps us solve all this.
fix previous commit; note quarto issue, see quarto-dev/quarto-cli#6809
mcanouil commentedon Jul 14, 2025
This seems to be a duplicate of:
andrewpbray commentedon Feb 23, 2026
FWIW I also hit this bug with the minimal
revealjs: defaultsetting, in this case in the_quarto.ymlfile. As I look at the metadata that I need for my usecase, that setting wasn't necessary at all, so it's easy to remove, but it sure was a perplexing error message that took some time to troubleshoot.Fix Pages build: separate html and revealjs project formats