Hi all,
I'm new to renv and would need some help. I've installed renv v0.8.2 using install.packages("renv")
. Then after initiating a new renv project with renv::init()
, I attempted to install shiny using install.packages("shiny")
. This didn't work - it looks like renv attempts to install the latest shiny version (v1.4.0) form a non-existant CRAN archive tar.gz, which returns a 404 Error.
> install.packages("shiny")
Retrieving 'https://stat.ethz.ch/CRAN/src/contrib/Archive/shiny/shiny_1.4.0.tar.gz' ...
Error: failed to retrieve package 'shiny'
In addition: Warning messages:
1: In downloader(url, destfile, type, request, headers) :
curl: (22) The requested URL returned error: 404 Not Found
2: In downloader(url, destfile, type, request, headers) :
curl: (22) The requested URL returned error: 404 Not Found
Traceback (most recent calls first):
8: install.packages("shiny")
7: install(pkgs)
6: renv_retrieve(packages)
5: handler(package, renv_retrieve_impl(package))
4: renv_retrieve_impl(package)
3: renv_retrieve_repos(record)
2: stopf("failed to retrieve package '%s'", record$Package)
1: stop(sprintf(fmt, ...), call. = call.)
Instead, I have to install shiny using a direct URL to the tar.gz file with install.packages("https://cran.r-project.org/src/contrib/shiny_1.4.0.tar.gz")
. This works, but it is quite a workaround. I had the same issue when installing dplyr and stringr.
Would anyone know what I need to change in order to sucessfully install packages in renv managed projects using the default syntax (package names, instead of URLs)?
Thanks for your advice!
Milica