Shiny app fails at reading packages: The application failed to start (exited with code 1)

I can deploy my Shiny app locally, but when I try to deploy it in, the application fails to start

I've already checked a lot of issues and similar questions but none of the answers worked for me. I don't include install.packages() or setwd() lines in my code.

My shiny app uses the following libraries:


And I get this error message in the shiny apps url when I try to deploy it:

An error has occurred
The application failed to start (exited with code 1).

Error in value[[3L]](cond) : there is no package called ‘RColorBrewer’
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

And this error in the RStudio IDE:

Preparing to deploy application...DONE
Uploading bundle for application: 1454528...DONE
Deploying bundle: 2581070 for application: 1454528 ...
Waiting for task: 666404305
  building: Processing bundle: 2581070
  building: Installing packages
  building: Installing files
  building: Pushing image: 2799820
  deploying: Starting instances
  terminating: Stopping old instances
Application successfully deployed to
Deployment completed:
Warning message:
In fileDependencies.R(file) :
  Failed to parse C:/Users/rama_/AppData/Local/Temp/Rtmp63cnOU/file3b2c779a2a37/app.R ; dependencies in this file will not be discovered.

Any suggestions? Thanks!

Is it a single file app? Weird that RColorBrewer is not found.So you can run it ok locally?

By the way, I would avoid attaching all of tidyverse; attach the individual packages you need instead.

1 Like

The issue was generated by a special character (including a "ñ" in the script). I removed them from the data and I could run the app in!

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