Closed VtheRtech closed 3 weeks ago
Hi!
what's happening is that you have a system level library of packages that interferes with the Nix one at runtime. {igraph} is a dependency of {targets} that only gets installed when you want to draw the DAG. Try installing igraph with rix as well and it should work.
Another fix could be to run rix::rix_init()
within the projects folder to create an .Rprofile file that gets loaded when R gets started which removes the system library from libpath, but you'll have to install igraph anyways.
Also, it looks like you manually added these lines:
I recommend you list all the deps in the rix.R
file and then re-generate default.nix
. List every package that is used, also the ones that you may not call on top of your scripts using library
but with pkgs::fun()
, for example {xfun}
.
other fix could be to run
rix::rix_init()
within the projects folder to create an .Rprofile file that gets loaded when R gets started which removes the system library from libpath, but you'll have to install igraph anyway
Thanks, Bruno this was the fix! Big fan of your blog & books btw can't wait to see your updated material.
thanks for reporting the issue, I'll have to document this!
Hi Bruno!
I tested out the example script you gave in the docs and everything ran perfectly. However, when I reformatted the code and added it to my own pipeline there seemed to an unsatisfied dependencies seen below:
Below is the snippet of env_build.R aka rix.R: Link to Git Repo
the closest solution I found was here
I'm unsure how to implement this fix in nix-shell. Any suggestion or help would be appreciated.