trafficonese / leaflet.extras

Extra functionality for leaflet R package.
https://trafficonese.github.io/leaflet.extras/
GNU General Public License v3.0
211 stars 74 forks source link

Errors in publishing a Shiny app using leaflet.extras package (Couldn't normalize path in addResourcePath) #195

Closed cpuzhoulili closed 4 months ago

cpuzhoulili commented 4 years ago

Hello,

I am creating a Shiny app which creates maps using leaflet package, and I also used leaflet.extras to get rid of background color of the maps. I am using R version 3.6.0 in Windows. It works on my computer, but when I tried to publish my app on a Shiny open server (Linux system), I got an error below:

Warning: Error in value[[3L]]: Couldn't normalize path in addResourcePath, with arguments: prefix = 'map-widget-style-1.0.0'; directoryPath = 'C:/Program Files/R/R-3.6.0/library/leaflet.extras/htmlwidgets/build/map-widget-style' 106: stop 105: value[[3L]] 104: tryCatchOne 103: tryCatchList 102: tryCatch 101: addResourcePath 100: FUN 99: lapply 98: renderWidget 97: transform 96: func 94: f 93: Reduce 84: do 83: hybrid_chain 82: origRenderFunc 81: output$leaflet1 1: runApp

Maps don't show up in the app. Could anyone please help me figure out what is the problem and how to fix it? Thank you very much!

trafficonese commented 4 years ago

Can you reinstall leaflet.extras on the server? Something went obviously wrong there, as R is looking in the directoryPath for the files, but C:/Program Files is definitly not a Linux filepath :)