shiny trying to install data.table and failing, even though I am not using the package

I am trying to deploy a shiny app but the build fails with the following error message:

Preparing to deploy application...DONE
Uploading bundle for application: 4367037...DONE
Deploying bundle: 4800960 for application: 4367037 ...
Waiting for task: 967838190
  building: Processing bundle: 4800960
  building: Parsing manifest
  building: Building image: 5506274
  building: Fetching packages
  building: Building package: data.table
################################ Begin Task Log ################################ 
################################# End Task Log ################################# 
Error: Unhandled Exception: Child Task 967838197 failed: Error building image: Error fetching data.table (1.14.1) source. <CRANPackageSource repo='http://cran.rstudio.org'> unable to satisfy package: data.table (1.14.1)
Execution halted

I am not using data.table in the app, so not sure why it's trying to install it at all. I do have a development version installed, which isn't on CRAN, but again I can't figure out why it's trying to install it in the first place:

library(dplyr)
library(tidyr)
library(purrr)
library(scales)
library(ggplot2)
library(DT)
library(shiny)
library(lme4)
library(merTools)

Here's my session info:

R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 10.16

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] tidyr_1.1.2         jsonlite_1.7.2      splines_4.0.3       foreach_1.5.1      
 [5] merTools_0.5.2      Formula_1.2-4       shiny_1.6.0         assertthat_0.2.1   
 [9] askpass_1.1         statmod_1.4.35      latticeExtra_0.6-29 broom.mixed_0.2.6  
[13] pillar_1.6.0        backports_1.2.1     lattice_0.20-41     glue_1.4.2         
[17] digest_0.6.27       RColorBrewer_1.1-2  promises_1.1.1      checkmate_2.0.0    
[21] minqa_1.2.4         colorspace_2.0-0    htmltools_0.5.1.1   httpuv_1.5.5       
[25] Matrix_1.3-2        plyr_1.8.6          pkgconfig_2.0.3     broom_0.7.4        
[29] xtable_1.8-4        purrr_0.3.4         mvtnorm_1.1-1       scales_1.1.1       
[33] jpeg_0.1-8.1        later_1.1.0.1       lme4_1.1-26         openssl_1.4.3      
[37] arm_1.11-2          htmlTable_2.1.0     tibble_3.1.0        generics_0.1.0     
[41] ggplot2_3.3.3       ellipsis_0.3.1      DT_0.17             nnet_7.3-15        
[45] TMB_1.7.18          mime_0.10           survival_3.2-7      magrittr_2.0.1     
[49] crayon_1.4.1        fansi_0.4.2         nlme_3.1-151        MASS_7.3-53        
[53] foreign_0.8-81      rsconnect_0.8.18    tools_4.0.3         data.table_1.14.1  
[57] lifecycle_1.0.0     stringr_1.4.0       munsell_0.5.0       cluster_2.1.0      
[61] compiler_4.0.3      rlang_0.4.10        blme_1.0-5          grid_4.0.3         
[65] nloptr_1.2.2.2      iterators_1.0.13    rstudioapi_0.13     htmlwidgets_1.5.3  
[69] base64enc_0.1-3     boot_1.3-26         gtable_0.3.0        codetools_0.2-18   
[73] curl_4.3            abind_1.4-5         DBI_1.1.1           reshape2_1.4.4     
[77] R6_2.5.0            gridExtra_2.3       knitr_1.31          dplyr_1.0.3        
[81] fastmap_1.1.0       utf8_1.2.1          Hmisc_4.4-2         stringi_1.5.3      
[85] Rcpp_1.0.6          vctrs_0.3.7         rpart_4.1-15        png_0.1-7          
[89] tidyselect_1.1.0    xfun_0.20           coda_0.19-4       

data.table is one of the depenndency of the merTools package, you can check with below code:

tools::package_dependencies(recursive = TRUE)$merTools
#>   [1] "arm"          "lme4"         "methods"      "dplyr"        "mvtnorm"     
#>   [6] "foreach"      "shiny"        "abind"        "ggplot2"      "blme"        
#>  [11] "broom.mixed"  "utils"        "MASS"         "Matrix"       "stats"       
#>  [16] "coda"         "graphics"     "grDevices"    "Hmisc"        "nlme"        
#>  [21] "broom"        "purrr"        "stringr"      "tibble"       "tidyr"       
#>  [26] "ellipsis"     "generics"     "glue"         "lifecycle"    "magrittr"    
#>  [31] "R6"           "rlang"        "tidyselect"   "vctrs"        "pillar"      
#>  [36] "codetools"    "iterators"    "digest"       "grid"         "gtable"      
#>  [41] "isoband"      "mgcv"         "scales"       "withr"        "splines"     
#>  [46] "parallel"     "lattice"      "boot"         "minqa"        "nloptr"      
#>  [51] "Rcpp"         "RcppEigen"    "httpuv"       "mime"         "jsonlite"    
#>  [56] "xtable"       "htmltools"    "sourcetools"  "later"        "promises"    
#>  [61] "tools"        "crayon"       "fastmap"      "commonmark"   "bslib"       
#>  [66] "cachem"       "backports"    "sass"         "jquerylib"    "survival"    
#>  [71] "Formula"      "latticeExtra" "cluster"      "rpart"        "nnet"        
#>  [76] "foreign"      "gridExtra"    "data.table"   "htmlTable"    "viridis"     
#>  [81] "base64enc"    "cli"          "fansi"        "utf8"         "farver"      
#>  [86] "labeling"     "munsell"      "RColorBrewer" "viridisLite"  "stringi"     
#>  [91] "pkgconfig"    "cpp11"        "knitr"        "checkmate"    "htmlwidgets" 
#>  [96] "rstudioapi"   "png"          "jpeg"         "colorspace"   "fs"          
#> [101] "rappdirs"     "yaml"         "evaluate"     "highr"        "markdown"    
#> [106] "xfun"

Created on 2021-07-09 by the reprex package (v2.0.0)

Great catch, I missed the recursive aspect and wasn’t seeing it as a dependency. I originally installed a dev version, but because I didn’t use devtools::install_github shiny was looking for the version on CRAN.

Reinstalled and now it’s deploying without a problem. Thanks!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.