vue-r / vueR

vue.js for R
https://vue-r.github.io/vueR
Other
140 stars 14 forks source link

Error: path for html_dependency not provided #1

Closed mwhitaker closed 4 years ago

mwhitaker commented 7 years ago

Thanks for a great package. Having fun trying some of your examples but when I try to render as a Rmd file to html I get this error. Eg:

mint <- htmlDependency(
  name = "mint-ui",
  version = "2.0.5",
  src = c(href="https://unpkg.com/mint-ui/lib"),
  script = "index.js",
  stylesheet = "style.css"
)
rmarkdown:::validate_html_dependency(mint)
#Error: path for html_dependency not provided

This has likely nothing to do with this package and is about rmarkdown/knitr, but if you could point me in the right direction to get the dependencies working for Rmd I'd appreciate it!

Michael

timelyportfolio commented 7 years ago

Thanks @mwhitaker. I am really glad you are trying out vueR. Please let me know if you have any Vuejs experience. I am still not sure if I have determined the best patterns for R + Vuejs.

The error you are getting is super annoying and related to https://github.com/rstudio/rmarkdown/issues/794. Unfortunately, there has been no response from the RStudio team on this. The href works everywhere (console, Shiny, etc.) except rmarkdown. To get around the issue, you will need to locally copy the js and css and reference that with src=c(file="..."). Or, I might soon add some of these components to this package. Unfortunately, the all-in js for many of these adds up quickly and would prevent CRAN submission.

Let me know if this doesn't make sense, and I will write up a quick demo.

mwhitaker commented 7 years ago

Thanks Kent, I was able to get this to work in my rmd file by adding the js and css dependencies manually, just like you suggested. Still kicking the tires as var as Vuejs is concerned and if it makes sense in my workflow.

I think we may be kindred spirits as I love combining different systems/approaches/APIs, except I don't quite have the chops you do! Your contribution to formattable/sparkline also very helpful.

BilboBaagins commented 7 years ago

Hi timelyportfolio, If you could do up a quick demo of this it would be much appreciated. Thanks

d8aninja commented 6 years ago

FWIW putting runtime: shiny in your yaml header cleared this same error when setting up a basic flexdashboard.

timelyportfolio commented 4 years ago

closing for now, but please reopen if anyone woud like to continue the discussion

Leran10 commented 3 years ago

Hi, I'm trying to render a Rmarkdown file in linux and eventually I want it to generate a dynamic .html file for people to checkout. The command I'm using is R -e "rmarkdown::render('./test_rshiny2.Rmd',output_file='./results/Diagnos_Plot.html')". However I kept getting this error: Error: path for html_dependency not provided.

Can anyone here provide some help? Thanks so much!!