Closed jacpete closed 1 month ago
Just encountered this as well. It indeed helps to set an environment variable TMPDIR
beforehand. For example:
export TMPDIR=$HOME/temp
mkdir -p $TMPDIR
R
pkgdown::build_site()
Unfortunately, the error message you get when running pkgdown::build_site()
is very unhelpful to say the least.
Could this error message be solved by copying the R package into the tempdir before running the quarto render?
This looks like a quarto issue, pkgdown should be fine once that is resolved.
I tracked this bug down to https://github.com/quarto-dev/quarto-cli/issues/2671. The actual bug is reproduced there in a minimal reprex, so I'm just going to show an example of what a user of
pkgdown
may see and provide a workaround that others can use until this is fixed in quarto. Essentially, my project exists on a mounted network drive at/mnt/home/jacob/GitHub/support-onepasswoRd
and/tmp
is on the local filesystem.In my project I ran
build_articles()
and got the following error:I then narrowed the render to a single article to see if I could get more information and the signature error for the quarto issue popped up:
This line was the indicator for the quarto issue:
It looks like using the default temporary directory set by the session is hard-coded into this package at: https://github.com/r-lib/pkgdown/blob/0cb9d38d1dc25946f01ee7500be9665985d8784e/R/build-quarto-articles.R#L77-L96 With no option in the command to specify a different one. However, as a workaround, you can set the temp directory location used by
withr::local_tempfile()
with theTMPDIR
environmental variable as described at https://rdrr.io/r/base/tempfile.html, but we have to launch it in a separate process because:Example Workaround