Unreproducible error from `pkgdown` when building vignettes

Hi,

In my package, when I render vignettes with pkgdown::build_articles(quiet = FALSE), I get:

> pkgdown::build_articles(quiet = FALSE)
── Building articles ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Reading vignettes/contributing.qmd
Reading vignettes/customize-parameter-boundaries-and-estimation-warning.qmd
Reading vignettes/generate-clutch-names.qmd
Reading vignettes/how-to-use-lifelihood.qmd
Reading vignettes/lifelihood.qmd
Reading vignettes/overview.qmd
Reading vignettes/required-data-format.qmd
Reading vignettes/setting-up-the-configuration-file.qmd
Running `quarto render`
[1/8] contributing.qmd


processing file: contributing.qmd
1/1
output file: contributing.knit.md

[2/8] customize-parameter-boundaries-and-estimation-warning.qmd


processing file: customize-parameter-boundaries-and-estimation-warning.qmd
1/21                   
2/21 [unnamed-chunk-1] 
Error in `value[[3L]]()`:
! Could not find a root 'DESCRIPTION' file that starts with '^Package'
  in
  '/private/var/folders/m2/jfzxyg4s0xz3jyw5f94r7tcm0000gn/T/Rtmp4lglhp/pkgdown-quarto-4381337ae1cf'.
ℹ Are you in your project directory and does your project have a 'DESCRIPTION'
  file?
Backtrace:
    ▆
 1. └─devtools::load_all()
 2.   └─pkgload::load_all(...)
 3.     └─pkgload::pkg_path(path)
 4.       └─base::tryCatch(...)
 5.         └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 6.           └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 7.             └─value[[3L]](cond)
 8.               └─cli::cli_abort(msg, class = "pkgload_no_desc")
 9.                 └─rlang::abort(...)

Quitting from customize-parameter-boundaries-and-estimation-warning.qmd:27-30 [unnamed-chunk-1]
Execution halted

The relevant error message is Error in value[3L]: ! Could not find a root 'DESCRIPTION' file that starts with '^Package'.

The thing is that my description file seems perfectly fine (I made it with usethis::use_description() and you can find it here on github).

But mainly, the error occurs when rendering this specific vignette customize-parameter-boundaries-and-estimation-warning.qmd

And if I run quarto::quarto_render("vignettes/customize-parameter-boundaries-and-estimation-warning.qmd"), it works perfectly fine.

It seems like the error is related to my description file, but it's fine (or is it?). So I tried to reproduce the error, but it only occurs when vignettes are rendered with pkgdown.

Any hint on what I could do to try to reproduce this error in a smaller environment?

I think this is possibly Working directory for quarto vignettes/articles · Issue #2877 · r-lib/pkgdown · GitHub

Yes it might be.

A thing I realised is that the error occurs when I tried to access some data from my package (that I added with usethis::use_data()). When I don't try to use that data, it works.

I'll try to make a reprex.

Update: I didn't manage to get a reprex.

But I now don't have the issue anymore since I replaced devtools::load_all() by library(package_name) in my vignettes. Probably should have done that before.

If this is something that should be avoided in general, maybe it would be useful to warn users if they use devtools::load_all() in vignettes?