Shiny app working on local server, but won't deploy to server due to error

Does the same error happen if you run your Shiny app locally on a fresh, empty R session? See this post for a discussion how to do that

The error message is saying that R is unsuccessfully looking for the object named sales_week, probably referenced in a function call somewhere near the beginning of your app. My guess is that this object was created by you outside of the app code, and is available in your local environment now, so the app runs successfully on local. Running the app in a fresh empty R-session locally should produce the same error message you are seeing on the failed deploy.

Long term you will want to save and commit the data file(s) with your app when you deploy. The app code should have the required lines to read sales_week into memory so your Shiny functions can find and use it.

1 Like