Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Error in loadNamespace(name) : there is no package called ‘devtools’ Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted #50

Closed
pozlepster opened this issue Oct 7, 2018 · 2 comments

Comments

@pozlepster
Copy link

Hi,

I am trying to build a docker contained for a shiny app. I need to include the following packages: readr and rdrop2. I have managed to compile the image with rocker/tidyverse using the following code:

FROM rocker/tidyverse:latest
RUN R -e "devtools::install_github('karthik/rdrop2') "
EXPOSE 3838

The problem is I don't want to user rocker/tidyverse (I don't need RStudio). However, I cannot build the container using rocker/shiny. I tried to install the packages from CRAN, from devetools, but it doesn't help. My docker file is:

FROM rocker/shiny:latest

RUN R -e "install.packages('devtools')"
RUN R -e "install.packages('readr')"
RUN R -e "devtools::install_github('karthik/rdrop2')"

EXPOSE 3838

devtools installation seems to be successful (when I re-run the script docker uses the cache for that part), but then I get the error: Error in loadNamespace(name) : there is no package called ‘devtools’
Calls: :: ... tryCatch -> tryCatchList -> tryCatchOne ->
Execution halted
. I would appreciate some advice on how to solve this problem.

@cboettig
Copy link
Member

cboettig commented Oct 8, 2018

I think there are some system dependencies devtools needs to install appropriately, but I think the simplest solution is just to use the recently added rocker/shiny-verse image as your base image instead, which already has devtools installed. e.g.

FROM rocker/shiny-verse:latest
RUN R -e "devtools::install_github('karthik/rdrop2')"

should do it. (aside: note that shiny images already expose 3838, so no need to do so again).

@pozlepster
Copy link
Author

Cheers, this solved my problem. I wasn't aware that a rocker/shiny-verse image existed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants