ramnathv / htmlwidgets

HTML Widgets for R
http://htmlwidgets.org
Other
790 stars 207 forks source link

Error: lexical error: invalid char in json text. #273

Open briangottfried opened 7 years ago

briangottfried commented 7 years ago

Hello,

I am attempting to make a htmlwidget but I am running into some trouble when scaffolding reads the bower.json.

htmlwidgets::scaffoldWidget("epivizrChart", "epiviz/epiviz-chart")

Error: lexical error: invalid char in json text.
                                       inst/htmlwidgets/lib/epiviz/epi
         (right here) ------^

It's failing at this line.

readBower <- function(pkg, src = "inst/htmlwidgets/lib"){
  **bower = jsonlite::fromJSON(
    file.path(src, pkg, 'bower.json')
  )**
  ...
}

I've been stuck on this for a few days. Any ideas? Thanks!

ramnathv commented 7 years ago

I took a look at epiviz/epiviz-chart and it seems to use polymer and web-components. So I am not sure if it can be ported as-is to htmlwidgets. I will leave this issue open so someone can take a look at it later, since we might want to support web-components at some point.

briangottfried commented 6 years ago

@ramnathv Is there any hope to support web components in the near future? I would like to add a .html file as a dependency that would generate a link rel='import' tag in the head. Thanks!