This seems unusual... htmltools::saveWidget should not have anything to do with PANDOC. Strange.
Consider this code, it produces the plainest of plain vanilla leaflets & saves it as a html document. It is also reproducible
library(sf)
library(leaflet)
# the iris of spatial data...
shape <- st_read(system.file("shape/nc.shp", package="sf")) %>% # included with sf package
st_transform(4326) # just because WGS84
# the plainest of plain vanilla leaflets
map <- leaflet() %>%
addProviderTiles(providers$Stamen.Toner) %>%
addPolygons(data = shape, color = "red",
label = ~NAME)
# save it!
htmlwidgets::saveWidget(map, "map.html", selfcontained = T)