Reputation: 87
I want to make a plot in Rstudio and share it with others. I have already made an account in shiny website but when I want to publish the plot I have an error
could not find file to deploy
. Any suggestions?
library(shiny)
library(plotly)
ui <- fluidPage(
plotlyOutput("p")
)
server <- function(input, output, ...) {
output$p <- renderPlotly({
p <- plotly_build(qplot(1:10))
p$elementId <- NULL
p
})
}
shinyApp(ui, server)
Upvotes: 4
Views: 4411
Reputation: 11
As suggested early, this issue is related to the path (maybe some special characters or its length). Moving the working directory of the project to the root directory of your drive should solve it.
Upvotes: 0
Reputation: 11
I had this same error and solved it as follows. Create a folder on disk C with a simple name like shiny and create your shiny app inside it, this error occurs due to the names of folders and subfolders until you get to the folder where you are creating shiny.
Upvotes: 0
Reputation: 198
In my experience, if the file path contains special characters (even scandinavian letters) this error occurs.
Upvotes: 1
Reputation: 313
Yes, when I have the app on a file server, I get the same error. When I move the folder to e.g. my desktop, then works fine.
Upvotes: 0
Reputation: 601
You should have a screen like this
I guess there's something wrong with your working directory or something like that. You could always do it by hand as detailed here, with rsconnect https://shiny.rstudio.com/articles/shinyapps.html
Upvotes: 2