rstudio / packrat

Packrat is a dependency management system for R
http://rstudio.github.io/packrat/
401 stars 89 forks source link

Not recognizes packrat init file #589

Closed jennysjaarda closed 4 years ago

jennysjaarda commented 4 years ago

I am trying to install a package with github via

 devtools::install_github("xiaodaigh/disk.frame")

But when packrat mode is on, I get the following errors. Specifically it says it can't find the packrat/init.R file which definitely exists...

Downloading GitHub repo xiaodaigh/disk.frame@master
   NULL
   Error in file(filename, "r", encoding = encoding) : 
     cannot open the connection
   Calls: source -> file
   In addition: Warning message:
   In file(filename, "r", encoding = encoding) :
     cannot open file 'packrat/init.R': No such file or directory
   Execution halted
Error: Failed to install 'disk.frame' from GitHub:
  System command error, exit status: 1, stdout + stderr:
E> NULL
E> Error in file(filename, "r", encoding = encoding) : 
E>   cannot open the connection
E> Calls: source -> file
E> In addition: Warning message:
E> In file(filename, "r", encoding = encoding) :
E>   cannot open file 'packrat/init.R': No such file or directory
E> Execution halted
kevinushey commented 4 years ago

This looks like a bug in callr. See also:

https://github.com/rstudio/renv/issues/310 https://github.com/rstudio/renv/issues/297 https://github.com/r-lib/callr/issues/139

mlell commented 4 years ago

In the meantime until this is fixed in callr, as a workaround, you can downgrade callr