Unable to publish R Shiny App: Error in `quartoInspect()`:

I am trying to deploy a Shiny application (FC_Crime_Explorer.R) with shinyapps.io. The application, which presents a leaflet map, runs perfectly on my local machine. However, when I try to publish it, I get the following error message

Error in `quartoInspect()`:
! Failed to run `quarto inspect` against your content:
ERROR: C:/Users/sgkol/OneDrive - The Ohio State University/CJRC
Projects/Franklin County Sheriff Crime Analysis/Shiny App
Deployment/FranklinCounty_Crime_Explorer/FC_Crime_Explorer.R is not a valid
Quarto input document

I have verified that there is no code in the R script that could be interpreted as Quarto. Moreover, the R script contains all of the necessary code to run the app. It imports the data files which are housed within the directory, loads all required packages, and specifies both the ui and server.

Does anyone have any ideas what could be causing this issue?

1 Like

I was getting this issue because I wasn't specifying the appDir in deployApp(); this meant that the project working directory was being treated as the appDir (this is the default), and the app itself was treated as a file within the app directory, which caused the error. I resolved the problem with something like:

deployApp(appName = "name-of-app", appDir = "directory/where/my/app.R")

This topic was automatically closed 90 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.