Shiny App Question File Number

I tried publishing a shiny app on to, but received an error
saying that my directory had too many files (>10000). This confuses me because
my directory has less than 150 files.
Any possible reason for this error, and how to fix it?

This is the exact error code:

Error in bundleFiles(appDir) : 
  The directoryC:\Users\Owner\Documents
cannot be deployed because it contains 
too many files (the maximum number of files is 10000). 
Remove some files or adjust the rsconnect.max.bundle.files option

It seems you are trying to deploy from you home directory. In this case Your bundle may contain too many files if you don't select them.

First, Good practice is to use rstudio project. This will be easier to deploy from the IDE. Indeed there is publish button that you may already use. This integration of rsconnect with the IDE help you deploy. The menu changes depenging from which window you click : source or viewer.

This menu should help you select which files to put in your bundle . Just put the files that you really need.

Note you can also use rsconnect :package: directly. There are argument for files selection in the deploy functions.

So to prevent from sending more than 1000 files, look at you bundle, adjust the files selection to put only the necessary, and try to republish.

1 Like