Application depends on..

I have a shiny application running since more than 2 years. Today I renewed underlying data and wanted to publish to shinyapp.io. I didn't change the code. Locally on my computer it works without any problems.
Got these messages:

  • Application depends on package "RgoogleMaps" but it is not
    installed. Please resolve before continuing
  • Application depends on package "ggmap" but it is not installed.
    Please resolve before continuing.
  • Application depends on package "jpeg" but it is not installed.
    Please resolve before continuing.
  • Application depends on package "mapdata" but it is not installed.
    Please resolve before continuing.
  • Application depends on package "mapproj" but it is not installed.
    Please resolve before continuing.
  • Application depends on package "maps" but it is not installed.
    Please resolve before continuing.
  • Application depends on package "rjson" but it is not installed.
    Please resolve before continuing.

These are the libraries loaded with my app.R
library(shiny)
library(shinydashboard)
library(tidyverse)
library(reshape2)
library(lubridate)
library(knitr)
library(plotly)
library(ggpubr)
library(grid)
library(gridExtra)
library(kableExtra)
library(leaflet)
library(sf)
library(geojsonio)
library(geojsonsf)
library(directlabels)

Thanks for help Peter

run your app locally , succesfully, and then stop it, and check what libraries are loaded by looking in sessionInfo()
is RgoogleMaps listed in that list ?

1 Like

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

Ran sessinInfo(). None of the mentioned packages is displayed there. Neither in attached nor in loaded by namespace.

I don't exactly know how to fix your program.
I would try rsconnect::appDependencies()
and look in there.
then I would rsconnect::writeManifest()
and check in that.
finally I'd try to redeploy the app

1 Like

In
rsconnect::appDependencies() I find the packages with warnings:
1: In FUN(X[[i]], ...) :
Failed to infer source for package 'RgoogleMaps'; using latest available version on CRAN instead

Why do I need those packages now, last deploy was 1 month ago without any problems.

from the documentation of appDependencies()

Dependencies are determined by parsing application source code and looking for calls to library, require, ::, and :::.

Recursive dependencies are detected by examining the Depends, Imports, and LinkingTo fields of the packages immediately dependend on by the application.

I don't know if this is a case of a bug which means dependencies are detected where they dont exist, or if the dependency is there and wasnt previously and you arent aware of it.

One thing you could try is to remove.packages RgoogleMaps to see if you ever had it previously on your local machine. Then run your local app and see if it complains. IT might give you info where it breaks as to what had the dependency ?

Now I installed all those packages from CRAN and it works. Strange, I don't know why that happened today. Maybe someone changed dependencies in the background.
Thanks for your help