R shiny : packages are not loaded

I wrote a Shiny App with R Shiny, I created an account on Shinyapps.io and every step worked with rsconnect, and rsconnect::deployApp('/path/to/my/app') open a new window where my app is supposed to be displayed.

The problem is that shinyapps cannot load the packages I used in my code.
The error message is :

An error has occurred

The application failed to start (exited with code 1).

Le chargement a nécessité le package : readxl

Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :

aucun package nommé ‘readxl’ n'est trouvé

(I just put the warning for one package but there's the same for every one of them)

What should I do ?

Is there a call to library(readxl) or readxl:: in your code ?
Or is readxl a dependency of one of your other :package: you use ?

You could try rsconnect::appDependencies() to see the discovered dependencies from your code. Check that readxl is in the list.

library("readxl") is the first line of my code, and all of the packages I use appear when I do rsconnect::appDependencies()

I finally found my mistake : I had to replace library("readxl") by library(readxl) (without quotation marks) for all of my packages and in both app.R (where I write the shiny app) and data.R (where I do all my data stuff)

thanks anyway for your help

1 Like

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