Skip to content

A repo initiated with quarto use binder does not install packages in renv.lock during image build #7720

@stephan-koenig

Description

@stephan-koenig

Bug description

After a mybinder container based on a Quarto project in GitHub repo including the files generated with quarto use binder is started, the R packages in the renv.lock are not already installed.

Suggested solution:
I believe the solution is to change the install.R file to use renv::restore() (instead of renv::activate()):

install.packages('renv')
renv::restore()

Steps to reproduce

This GitHub repo has already my suggested solution implemented:

https://github.com/stephan-koenig/quarto-template

Expected behavior

All packages in renv.lock are installed when container is started.

Actual behavior

When starting RStudio on the binder container, renv asks if you want to install the missing packages.

Your environment

  • IDE: RStudio 2023.09.1+494
  • OS: macOS Sonoma 14.1.1 (23B81)

Quarto check output

Quarto 1.4.510
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.9: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.510
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2023.01
      Chromium: 869685

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/stephan/Library/TinyTeX/bin/universal-darwin
      Version: 2022

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.8.18 (Conda)
      Path: /Users/stephan/Library/r-miniconda/envs/repo2docker/bin/python
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with conda install jupyter

[✓] Checking R installation...........OK
      Version: 4.3.2
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
      knitr: 1.45
      rmarkdown: 2.25

[✓] Checking Knitr engine render......OK

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions