Troubleshooting
This page documents a number of strategies you can employ in case you run into problems with Quarto. As always, we welcome feedback and bug reports on the Quarto issue tracker, but this page might help you get up and running quickly.
Basics
Check the version of quarto and its dependencies
You can check the version of Quarto and its dependencies by running quarto check
. Here’s an example of the output it generates:
[✓] Checking versions of quarto binary dependencies...
Pandoc version 2.19.2: OK
Dart Sass version 1.32.8: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.2.313
Path: /Users/cscheid/repos/github/quarto-dev/quarto-cli/package/dist/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.9
Path: /Users/cscheid/virtualenvs/homebrew-python3/bin/python3
Jupyter: 5.1.3
Kernels: python3, julia-1.6, julia-1.8
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.2.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/cscheid/repos/github/quarto-dev/quarto-web/renv/library/R-4.2/aarch64-apple-darwin20
- /private/var/folders/nm/m64n9_z9307305n0xtzpp54m0000gn/T/RtmpXmQfZA/renv-system-library
rmarkdown: 2.14
[✓] Checking Knitr engine render......OK
Get a stack trace
Setting QUARTO_PRINT_STACK=true
in your environment will cause Quarto to print a stack trace when an error occurs.
On PowerShell:
$env:QUARTO_PRINT_STACK = "true"
On bash-like shells:
export QUARTO_PRINT_STACK=true
Verbose mode
Quarto will print more information about its internal state if you set QUARTO_LOG_LEVEL=DEBUG
in your environment.
Inspect log files
Quarto creates log files that can help you diagnose problems. These are stored in different locations depending on your operating system:
%LOCALAPPDATA%\quarto\logs
${HOME}/Library/Application Support/quarto/logs
If $XDG_DATA_HOME
is set, ${XDG_DATA_HOME}/.local/share/quarto/logs
, otherwise ${HOME}/.local/share/quarto/logs
Out-of-memory issues
When building a large project or website, you might run into memory limits. In that case, consider the following environment variable.
In this example, we’re setting the maximum amount of memory to be allocated by Deno to be 8GB. Adjust this to your computer’s limits.
On PowerShell:
$env:QUARTO_DENO_EXTRA_OPTIONS = "--v8-flags=--max-old-space-size=8192"
On bash-like shells:
export QUARTO_DENO_EXTRA_OPTIONS=--v8-flags=--max-old-space-size=8192
Installer issues
In macOS, installers write their output to /var/log/install.log
. Inspecting this file might offer hints to what went wrong.
If you’re going to ask for help on public forums, be aware that every macOS installer writes to the same file /var/log/install.log
. You should make sure you’re not accidentally disclosing installation information you would rather not.
PDF/LaTeX issues
If quarto finds an existing installation of texlive
in your system, it will use that. If you’re seeing issues with rendering to PDF, make sure you have an up-to-date installation of texlive
. Alternatively, you can have quarto use its own version, by calling quarto install tinytex
.
Environment, Libraries, and Dependencies
One common source of tricky problems is the presence of multiple installations of R and Python in a system. Quarto will attempt to find an R or Python installation, and sometimes your shell environment is pointing to a different one.
knitr
If you suspect that quarto is finding the wrong version of an R installation, you can obtain information about the R installation that Quarto sees by running the following .qmd file:
---
engine: knitr
---
```{r}
sessionInfo()
Sys.getenv()
.libPaths()
# If the sessioninfo package is available,
# it provides output that is easier to read,
# and can write its results to a file
:::session_info(to_file = "quarto-session-info-output.txt")
sessioninfo```
You can then also run those commands from your R environment, and compare the output. If sessioninfo
is available, then you can ask for a difference between the outputs more directly:
:::session_diff(new = "quarto-session-info-output.txt") sessioninfo
Advanced
Debugging Jupyter engine issues
To enable Jupyter debugging, add the following to your YAML front matter:
execute:
debug: true
Quarto creates a log of the execution of jupyter notebooks in its log directory under jupyter-kernel.log
.
If Jupyter execution is hanging instead of failing, you can force immediate flushing of the log by setting QUARTO_JUPYTER_FLUSH_LOGS=true
in your environment before running quarto.
Debugging Lua filters
Useful Lua helper functions
Quarto includes a number of useful Lua helper functions that can be used to debug Lua filters. These are available in the quarto
module, and can be used as follows:
quarto.log.output(obj) -- prints a potentially complex object to the console
Filter tracing
Setting QUARTO_TRACE_FILTERS=true
in your environment will cause Quarto to produce a trace of the Lua filters it runs. This will be a file written to the directory in which quarto
runs, named quarto-filter-trace.json
. We include an HTML page that can be used to visualize this trace, which you can find in the quarto-cli
repository at package/src/common/trace-viewer/index.html
. Open this page in your browser and provide the path to the JSON file as the URL parameter file
(eg. index.html?file=quarto-filter-trace.json
), and you’ll see a report of the changes produced by each part of the filter chain.