You should not use "library(anything)" in a package. You should rely on the Imports: field in the DESCRIPTION file along with importFrom() in your NAMESPACE file, or the Suggests: field in the DESCRIPTION file and if (requireNamespace("anypackage")) {anypackage::somefun} else {# avoid using anypackage}. See WRE 1.1.3.1.
But in this particular case this might be a temporary glitch on the CRAN server. On October 16, 2024 1:04:54 PM PDT, Michael Mahony <michael.mah...@cantab.net> wrote: > > >Apologies in advance for not providing a reproducible example, but I am >unsure how to reproduce the below error, as it did not occur on my >machine. > >I recently submitted a package to CRAN, after which I received an >automated email from lig...@statistik.tu-dortmund.de, saying my package >had failed the automated checks. I was advised to ask for help on this >mailing list if I did not know how to resolve the error. > >Details of the automated checks are provided here: >https://win-builder.r-project.org/incoming_pretest/hhmR_0.0.1_20241015_235116/ > >Essentially, when trying to install the package for Windows, the >following error was produced. > >``` >* installing *source* package 'hhmR' ... >** using staged installation >** R >** data >*** moving datasets to lazyload DB >** inst >** byte-compile and prepare package for lazy loading >Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), >versionCheck = vI[[j]]) : > there is no package called 'farver' >Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart >-> doWithOneRestart >Execution halted >ERROR: lazy loading failed for package 'hhmR' >* removing 'd:/RCompile/CRANincoming/R-devel/lib/hhmR' >``` > >This error has never occurred before when testing the package using >`devtools` or `rhub`. I imagine I probably need to add `library(farver)` >somewhere in my package, but am unsure where. > >If anyone has any advice about how to resolve this issue I would be very >greatful. > >Thank you in advance, > >Michael > [[alternative HTML version deleted]] > >______________________________________________ >R-package-devel@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Sent from my phone. Please excuse my brevity. ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel