How to efficiently do a R Shiny comma hunt

Viewed 51

I have packaged a shiny app with all good check on Windows (0 error, 0 warning, 0 note). The app works fine on my windows computer and install also without problem using :

remotes::install_local("my_app.tar.gz")

I have then attempted to dockerize this app. This is something I have done before with success so I am looking for a R code error, but who knows here is my Dockerfile :

FROM rocker/tidyverse:3.6

RUN apt-get update && apt-get install -y libv8-3.14-dev
RUN apt-get install -y xdg-utils --fix-missing && apt-get install -y apt-utils

# === R packages dependency
RUN R -e 'install.packages("pacman")'

RUN R -e "pacman::p_load('DT')"
RUN R -e "pacman::p_load('circlize')"
RUN R -e "pacman::p_load('data.table')"
RUN R -e "pacman::p_load('dplyr')"
RUN R -e "pacman::p_load('DT')"
RUN R -e "pacman::p_load('ggplot2')"

# === To use shiny package ===
COPY my_app_*.tar.gz  /app.tar.gz
RUN R -e "remotes::install_local('/app.tar.gz')"

# --- stuff to have it running whith docker run

This gives the error message on the linux container while installing the package :

* installing *source* package my_app ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in tag("div", list(...)) : argument is missing, with no default
Error: unable to load R code in package my_app
Execution halted
ERROR: lazy loading failed for package

Believed cause of problem : I have seen from an other SO question here that I should look for an extra comma lurking somewhere in the UI code.

Actual question : could anyone advise a way to solve this in an easier way than checking all my UI files for that/those extra comma(s) please ? I though of writing a function that parse and trim white spaces then look for 2 successive commas symbol but I am not sure how to begin...

Thanks in advance !

0 Answers
Related