title: Leaflet throws an error about html dependency error
body: <p>I just updated R and RStudio and now one of my plots is not working anymore (worked with R 4.1.2):</p>
  <pre><code>&gt; dput(head(dat))
  structure(list(place = c(&quot;Firozpur India&quot;, &quot;Chandigarh India&quot;, 
  &quot;Delhi India&quot;, &quot;Mumbai India&quot;, &quot;Bangalore India&quot;, &quot;Shahjahanpur India&quot;
  ), lon = c(74.6601408124889, 76.7797143, 77.1565959, 72.8773928, 
  77.590082, 79.7465629486983), lat = c(30.88510035, 30.7334421, 
  28.6600584, 19.0759899, 12.9767936, 27.91263315)), row.names = c(NA, 
  -6L), class = c(&quot;data.table&quot;, &quot;data.frame&quot;), .internal.selfref = &lt;pointer: 0x7fe0d580fae0&gt;)
  
  
  plt &lt;- leaflet(data = dat, options = leafletOptions(zoomControl = FALSE)) %&gt;% addTiles() %&gt;%
    addMarkers(~lon, ~lat) %&gt;% 
    addScaleBar(position = 'bottomright', 
                options = scaleBarOptions(maxWidth = 200, metric = T, imperial = T)) %&gt;% 
    addProviderTiles(provider = providers$CartoDB.DarkMatterNoLabels) 
  
  
  &gt; plt
  Error in copyDependencyToDir(dep, libdir, FALSE) : 
    Can't copy dependency files that don't exist: '/var/folders/x1/bvw5ntr53s5f48n1gbqpf6000000gn/T//RtmpnNNM7U/leaflet-providers_1.9.0.js'
  </code></pre>
  <p>** Session Info **</p>
  <pre><code>R version 4.2.0 (2022-04-22)
  Platform: x86_64-apple-darwin17.0 (64-bit)
  Running under: macOS Monterey 12.4
  
  Matrix products: default
  LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
  
  locale:
  [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
  
  attached base packages:
  [1] stats     graphics  grDevices utils     datasets  methods   base     
  
  other attached packages:
  [1] htmltools_0.5.2   data.table_1.14.2 leaflet_2.1.1    
  
  loaded via a namespace (and not attached):
   [1] htmlwidgets_1.5.4       compiler_4.2.0          magrittr_2.0.3         
   [4] R6_2.5.1                fastmap_1.1.0           cli_3.3.0              
   [7] leaflet.providers_1.9.0 tools_4.2.0             curl_4.3.2             
  [10] yaml_2.3.5              crosstalk_1.2.0         jsonlite_1.8.0         
  [13] digest_0.6.29           rlang_1.0.2            
  </code></pre>
  <p>I've tried reinstalling the packages - when that didn't work I reinstalled R and RStudio - no luck there either.</p>