jbkunst / highcharter

R wrapper for highcharts
http://jkunst.com/highcharter/
Other
717 stars 147 forks source link

Installation issues witth the package highcharter #803

Open Francois-lenne opened 9 months ago

Francois-lenne commented 9 months ago

Hello,

I try to dockerize a shiny dashboard.

First i create the docker image with this dockefile :


# Use the official R base image
FROM r-base:latest

# Install necessary packages
RUN R -e "install.packages(c('shiny', 'shinydashboard', 'dplyr', 'ggplot2','readxl','highcharter','sqldf','plotly'), repos='https://cran.rstudio.com/')"

# Copy your app.R file into the container
COPY app.R /srv/shiny-server/

# Expose the Shiny app's port (default is 3838)
EXPOSE 3838

# Run the Shiny app
CMD ["R", "-e", "shiny::runApp('/srv/shiny-server/app.R', host='0.0.0.0', port=3838)"]

but when i try to build the docker image with this command

docker build -t shiny-app .

i have this issue :

Error in library(highcharter) : there is no package called ‘highcharter

I don't have this error when i run in local (i install all the packages few month ago)

Can you help me ?

Thanks in advance 😃 , François Lenne

lyndon-bird commented 8 months ago

Check the docker image build log, I would suggest when it's trying to install highcharter it is falling, so when you try run it there is no highcharter library to call.

As a suggestion check the package prerequisites for the distribution, and you may need to add these on top of the base image

https://packagemanager.posit.co/client/#/repos/cran/packages/overview?search=highcharter

parthdacoder commented 4 months ago

@Francois-lenne did you get any solution? Facing the same issue here

Francois-lenne commented 4 months ago

@parthdacoder Hi ! No i work in other project right now but you Can try with the package golem i dont know if you have try this way

parthdacoder commented 4 months ago

RUN apt-get update && apt-get install -y libglpk-dev

Need the libglpk-dev library for highcharter. It worked for me!