Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using a provider tile prevents caching chunk on knitr #843

Closed
cderv opened this issue Feb 1, 2023 · 2 comments · Fixed by #884
Closed

using a provider tile prevents caching chunk on knitr #843

cderv opened this issue Feb 1, 2023 · 2 comments · Fixed by #884

Comments

@cderv
Copy link
Contributor

cderv commented Feb 1, 2023

Take this document

---
title: "test"
output: html_document
---

```{r}
library(leaflet)
```

```{r, cache = TRUE}
m <- leaflet() %>% setView(lng = -71.0589, lat = 42.3601, zoom = 12)
m %>% addProviderTiles(providers$OpenTopoMap)
```

We'll get an error like this

Error:
! path for html_dependency not found: C:/Users/chris/AppData/Local/Temp/RtmpaOTxJr
Backtrace:
    ▆
 1. └─rmarkdown::render("C:/Users/chris/Documents/test.Rmd", encoding = "UTF-8")
 2.   └─output_format$pre_processor(...)
 3.     └─rmarkdown (local) base(...)
 4.       └─rmarkdown:::html_extras_for_document(...)
 5.         └─rmarkdown (local) dependency_resolver(all_dependencies)
 6.           └─base::lapply(dependencies, validate_html_dependency)
 7.             └─rmarkdown (local) FUN(X[[i]], ...)
 8.               └─rmarkdown:::stop2("path for html_dependency not found: ", file)

I believe this is directly related to #732. Not using a temp file in the HTML dependency should solves this issue.

This came initially in quarto-dev/quarto-cli#4149

@schloerke I believe we already discussed on something related some time ago, but can't find a reference to it. Maybe you'll remember

@ericvmai
Copy link

ericvmai commented Oct 5, 2023

How do you NOT use a temp file in the HTML dependency?

@schloerke
Copy link
Contributor

Added new issue in rstudio/leaflet.providers#34 in leaflet.providers to get the ball rolling. A small change will be needed here, but it needs to be fixed in leaflet.providers first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants