I have a R package that I am trying to setup pkgdown
for. I'm following the instructions here, and am running build_site()
to generate the docs directory. When running this command, I get the error
Quitting from lines 28-29 (Data-Model.Rmd)
Error : package or namespace load failed for 'dm':
.onLoad failed in loadNamespace() for 'dm', details:
call: register_pkgdown_methods()
error: rlang::is_installed(c("DiagrammeR", "DiagrammeRsvg")) is not TRUE
Showing that the build is failing when trying to render one of the vignettes. However, if I just try to knit this vignette in a fresh interactive session, it knits fine.
I have tried including DiagrammeR and DiagrammeRsvg in Depends, Imports, or Suggests, and it still fails with the same error.
Any idea what I can do to fix this? The vignette is located on my github here. I understand this is not the ideal way to share an example, but it can repro'd by cloning the repo and running pkgdown::build_site()
The error is fairly informative; it tells you that
rlang::is_installed(c("DiagrammeR", "DiagrammeRsvg"))
is not TRUE
. I suspect if you run that line it will in fact return FALSE
. I installed DiagrammeRsvg
and the vignette built successfully.
I am not entirely sure why building the vignette with pkgdown
requires SVG export of your diagrams, but knitting them doesn't. Hopefully that solves the issue, though.