Skip to content

shinylive 0.3.0.9000 not using sf::sf_use_s2(FALSE) #170

@p-schaefer

Description

@p-schaefer

shinylive 0.3.0 allows use of the sf package despite lack of s2 on r-wasm by setting sf::sf_use_s2(FALSE):

Image

However, shinylive 0.3.0.900, the result is:

Image

I have tried shinylive::export(..., assets_version ="0.10.6") and shinylive::export(..., assets_version ="0.9.3") with the same result. I would really like to use shinylive 0.3.0.900 because I also want to use jsonvalidate with V8, which is not available/working in shinylive 0.3.0.

Below is an example app demonstrating the issue:

library(shiny)
library(mapview)
library(munsell)
sf::sf_use_s2(FALSE)

if (F){
  wd<-tempdir()
  unlink(file.path(wd,"docs"),recursive=T)
  # shinylive::export(wd, file.path(wd,"docs"), assets_version ="0.10.6")
}

ui <- fluidPage(
  leaflet::leafletOutput("test"),
)

server <- function(input, output) {

  output$test <- leaflet::renderLeaflet({
    mapview::mapview()@map
  })

}

# Create Shiny app ----
shinyApp(ui = ui, server = server)

Session Info:

R version 4.5.2 (2025-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_Canada.utf8  LC_CTYPE=English_Canada.utf8    LC_MONETARY=English_Canada.utf8 LC_NUMERIC=C                   
[5] LC_TIME=English_Canada.utf8    

time zone: America/Toronto
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.5.2    tools_4.5.2       rstudioapi_0.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions