ggplot2 Package Installation Failure on shinyapps.io - Unable to Deploy Any Shiny Apps Using ggplot2

Hello,

I've been attempting to deploy a Shiny app that uses ggplot2 to shinyapps.io, but I'm consistently encountering failures. This issue isn't limited to just the ggplot2 package; it's affecting the deployment of all Shiny apps that use ggplot2.

Here's the error log:

[2024-07-02T00:50:24.106888448+0000] Building R package: ggplot2 (3.4.2)
/mnt/packages/build /mnt
Error in .make_numeric_version(x, strict, .standard_regexps()$valid_numeric_version) : 
  invalid non-character version specification 'x' (type: double)
Error: unable to load R code in package 'ggplot2'
Execution halted
* installing to library '/usr/lib/R'
* installing *source* package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
ERROR: lazy loading failed for package 'ggplot2'
* removing '/usr/lib/R/ggplot2'
Error: Unhandled Exception: child_task=1432680297 child_task_status=failed: Error building image: Error building ggplot2 (3.4.2). Build exited with non-zero status: 1
Execution halted

This error occurs during the installation process of the ggplot2 package on the shinyapps.io server. It appears that the problem arises when processing version information.

As a result of this issue, it's impossible to deploy any Shiny apps that use ggplot2. Given that ggplot2 is a widely used core package for data visualization, this problem is likely to affect many Shiny developers.

I would appreciate help with the following questions:

  1. Can we identify the root cause of this issue?
  2. Is the shinyapps.io team aware of this problem?
  3. Are there any workarounds or solutions that developers can implement?
  4. Are there alternative visualization libraries that could be used instead of ggplot2?

I hope this issue can be resolved quickly so that we can resume deploying Shiny apps that use ggplot2. Thank you for your attention to this matter.

The message says it is building ggplot2 version 3.4.2, which is somewhat out of date. The current version is 3.5.1. If you have 3.4.2 installed on the machine from which you are trying to deploy the app, can you upgrade to 3.5.1 and see if that fixes the problem?