as makepathStars is created the file in a temporary directory.
I opened here because it was easier for me to build a mapview example, and I don't know if there could be other HTML dependencies in mapview with the same problem
FWIW, This is related to another issue we had with leaflet and leaflet.providers that did not support caching with knitr due to same usage of HTML dependency being in temporary directory
Initially, this comes from a report in Quarto: https://github.com/quarto-dev/quarto-cli/issues/9058
Here is a reprex with mapview
Error: ! path for html_dependency not found: C:/Users/chris/AppData/Local/Temp/RtmpyErHiA/data_stars779843bf736_754d19 Backtrace: ▆
What happens is that it will try to load what is cached, and as it is using another R session temp directory for one of its dependency.
This comes from https://github.com/r-spatial/mapview/blob/f35e32f0f992f6ab9b4ca650415f8f495d05f369/R/raster.R#L124-L127
and so from leafem : https://github.com/r-spatial/leafem/blob/6d6831352038b8f7462ff7afa698050c4e46fb5e/R/imagequery.R#L77
https://github.com/r-spatial/leafem/blob/6d6831352038b8f7462ff7afa698050c4e46fb5e/R/utils.R#L65-L80
as
makepathStars
is created the file in a temporary directory.I opened here because it was easier for me to build a mapview example, and I don't know if there could be other HTML dependencies in mapview with the same problem
FWIW, This is related to another issue we had with leaflet and leaflet.providers that did not support caching with knitr due to same usage of HTML dependency being in temporary directory
Hope this helps understand the issue. Happy to clarify or discuss any feedback you may have on this.