Skip to content

Can't install packages in a fresh project #941

@mikkmart

Description

@mikkmart

After creating a fresh project, I can't install any packages with renv. Here's the steps I've taken:

usethis::create_project("projects/renv-test")

# In the new project
renv::init()
renv::install("praise")
#> Retrieving 'https://cran.rstudio.org/bin/windows/contrib/4.1/praise_1.0.0.zip' ...
#> 	OK [downloaded 19.4 Kb in 0.4 secs]
#> Installing praise [1.0.0] ...
#> 	FAILED
#> Error installing package 'praise':
#> ==================================
#> 
#> * installing to library 'C:/Users/mikkmart/OneDrive - Orion Corporation/Tiedostot/R/win-library/4.1'
#> package 'praise' successfully unpacked and MD5 sums checked
#> Error: install of package 'praise' failed ["~/R/projects/renv-test/renv/staging/1/praise" does not exist]
dir.exists("~/R/projects/renv-test/renv/staging")
#> [1] TRUE

Maybe ~ is not expanded "correctly"? This has caused me headaches before:

path.expand("~")
#> [1] "C:/Users/mikkmart/OneDrive - Orion Corporation/Tiedostot"

The "installing to library" location also looks strange -- that's not somewhere I'd want my packages to go. (I normally set R_LIBS_USER="C:/Users/mikkmart/R/win-library/4.1")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions