Error with devtools::check(), usethis not found

After updating usethis to version 2.1.6 I get this error when I test golem apps:

* installing *source* package ‘mytest’ ...
** 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 ‘usethis’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
ERROR: lazy loading failed for package ‘mytest’
* removing ‘/tmp/Rtmpq6jXZ3/mytest.Rcheck/mytest’

This is curious, because if I build the tar.gz and run R CMD check mytest_0.0.0.9000.tar.gz, then I get 0 errors. Actually, the app runs ok and I can open it in the browser.

Here's my session info:

─ Session info ─────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.2.1 (2022-06-23)
 os       Ubuntu 20.04.5 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language en_CA:en
 collate  en_CA.UTF-8
 ctype    en_CA.UTF-8
 tz       America/Toronto
 date     2022-09-24
 rstudio  2022.07.1+554 Spotted Wakerobin (desktop)
 pandoc   2.18 @ /usr/lib/rstudio/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────
 ! package      * version    date (UTC) lib source
   askpass        1.1        2019-01-13 [1] RSPM (R 4.2.0)
   assertthat     0.2.1      2019-03-21 [1] RSPM (R 4.2.0)
   attachment     0.2.5      2022-05-15 [1] RSPM (R 4.2.0)
   attempt        0.3.1      2020-05-03 [1] RSPM (R 4.2.0)
   brio           1.1.3      2021-11-30 [1] RSPM (R 4.2.0)
   bslib          0.4.0      2022-07-16 [1] RSPM (R 4.2.0)
   cachem         1.0.6      2021-08-19 [1] RSPM (R 4.2.0)
   callr          3.7.1      2022-07-13 [1] RSPM (R 4.2.0)
   cli            3.4.0      2022-09-08 [1] RSPM (R 4.2.0)
   clipr          0.8.0      2022-02-22 [1] RSPM (R 4.2.0)
   commonmark     1.8.0      2022-03-09 [1] RSPM (R 4.2.0)
   config         0.3.1      2020-12-17 [1] RSPM (R 4.2.0)
   crayon         1.5.1      2022-03-26 [1] RSPM (R 4.2.0)
   credentials    1.3.2      2021-11-29 [1] RSPM (R 4.2.0)
   curl           4.3.2      2021-06-23 [1] RSPM (R 4.2.0)
   desc           1.4.1      2022-03-06 [1] RSPM (R 4.2.0)
   devtools       2.4.4      2022-07-20 [1] RSPM (R 4.2.0)
   digest         0.6.29     2021-12-01 [1] RSPM (R 4.2.0)
   ellipsis       0.3.2      2021-04-29 [1] RSPM (R 4.2.0)
   evaluate       0.16       2022-08-09 [1] RSPM (R 4.2.0)
   fansi          1.0.3      2022-03-24 [1] RSPM (R 4.2.0)
   fastmap        1.1.0      2021-01-25 [1] RSPM (R 4.2.0)
   fs             1.5.2      2021-12-08 [1] RSPM (R 4.2.0)
   gert           1.7.0      2022-08-07 [1] RSPM (R 4.2.0)
   gh             1.3.0      2021-04-30 [1] RSPM (R 4.2.0)
   gitcreds       0.1.1      2020-12-04 [1] RSPM (R 4.2.0)
   glue           1.6.2      2022-02-24 [1] RSPM (R 4.2.0)
   golem          0.3.3.9000 2022-09-04 [1] local
   here           1.0.1      2020-12-13 [1] RSPM (R 4.2.0)
   htmltools      0.5.3      2022-07-18 [1] RSPM (R 4.2.0)
   htmlwidgets    1.5.4      2021-09-08 [1] RSPM (R 4.2.0)
   httpuv         1.6.5      2022-01-05 [1] RSPM (R 4.2.0)
   httr           1.4.4      2022-08-17 [1] RSPM (R 4.2.0)
   hunspell       3.0.1      2020-12-09 [1] RSPM (R 4.2.0)
   jquerylib      0.1.4      2021-04-26 [1] RSPM (R 4.2.0)
   jsonlite       1.8.0      2022-02-22 [1] RSPM (R 4.2.0)
   knitr          1.40       2022-08-24 [1] RSPM (R 4.2.0)
   later          1.3.0      2021-08-18 [1] RSPM (R 4.2.0)
   lifecycle      1.0.2      2022-09-09 [1] RSPM (R 4.2.0)
   magrittr       2.0.3      2022-03-30 [1] RSPM (R 4.2.0)
   memoise        2.0.1      2021-11-26 [1] RSPM (R 4.2.0)
   mime           0.12       2021-09-28 [1] RSPM (R 4.2.0)
   miniUI         0.1.1.1    2018-05-18 [1] RSPM (R 4.2.0)
   openssl        2.0.2      2022-05-24 [1] RSPM (R 4.2.0)
   parsedate      1.3.0      2022-02-13 [1] RSPM (R 4.2.0)
   pillar         1.8.1      2022-08-19 [1] RSPM (R 4.2.0)
   pkgbuild       1.3.1      2021-12-20 [1] RSPM (R 4.2.0)
   pkgconfig      2.0.3      2019-09-22 [1] RSPM (R 4.2.0)
   pkgload        1.3.0      2022-06-27 [1] RSPM (R 4.2.0)
   prettyunits    1.1.1      2020-01-24 [1] RSPM (R 4.2.0)
   processx       3.7.0      2022-07-07 [1] RSPM (R 4.2.0)
   profvis        0.3.7      2020-11-02 [1] RSPM (R 4.2.0)
   promises       1.2.0.1    2021-02-11 [1] RSPM (R 4.2.0)
   ps             1.7.1      2022-06-18 [1] RSPM (R 4.2.0)
   purrr          0.3.4      2020-04-17 [1] RSPM (R 4.2.0)
   R6             2.5.1      2021-08-19 [1] RSPM (R 4.2.0)
   rappdirs       0.3.3      2021-01-31 [1] RSPM (R 4.2.0)
   rcmdcheck      1.4.0      2021-09-27 [1] RSPM (R 4.2.0)
   Rcpp           1.0.9      2022-07-08 [1] RSPM (R 4.2.0)
   rematch        1.0.1      2016-04-21 [1] RSPM (R 4.2.0)
   remotes        2.4.2      2021-11-30 [1] RSPM (R 4.2.0)
   rhub           1.1.2      2022-08-31 [1] RSPM (R 4.2.0)
   rlang          1.0.5      2022-08-31 [1] RSPM (R 4.2.0)
   rmarkdown      2.16       2022-08-24 [1] RSPM (R 4.2.0)
   roxygen2       7.2.1      2022-07-18 [1] RSPM (R 4.2.0)
   rprojroot      2.0.3      2022-04-02 [1] RSPM (R 4.2.0)
   rstudioapi     0.14       2022-08-22 [1] RSPM (R 4.2.0)
   sass           0.4.2      2022-07-16 [1] RSPM (R 4.2.0)
   sessioninfo    1.2.2      2021-12-06 [1] RSPM (R 4.2.0)
   shiny        * 1.7.2      2022-07-19 [1] RSPM (R 4.2.0)
   shinysurveys   0.2.0      2021-07-11 [1] CRAN (R 4.2.1)
   spelling       2.2        2020-10-18 [1] RSPM (R 4.2.0)
   stringi        1.7.8      2022-07-11 [1] RSPM (R 4.2.0)
   stringr        1.4.1      2022-08-20 [1] RSPM (R 4.2.0)
   sys            3.4        2020-07-23 [1] RSPM (R 4.2.0)
   testthat     * 3.1.4      2022-04-26 [1] RSPM (R 4.2.0)
   tibble         3.1.8      2022-07-22 [1] RSPM (R 4.2.0)
   urlchecker     1.0.1      2021-11-30 [1] RSPM (R 4.2.0)
   usethis        2.1.6      2022-05-25 [1] RSPM (R 4.2.0)
   utf8           1.2.2      2021-07-24 [1] RSPM (R 4.2.0)
   uuid           1.1-0      2022-04-19 [1] RSPM (R 4.2.0)
   vctrs          0.4.1      2022-04-13 [1] RSPM (R 4.2.0)
   waldo          0.4.0      2022-03-16 [1] RSPM (R 4.2.0)
   whisker        0.4        2019-08-28 [1] RSPM (R 4.2.0)
   whoami         1.3.0      2019-03-19 [1] RSPM (R 4.2.0)
   withr          2.5.0      2022-03-03 [1] RSPM (R 4.2.0)
   xfun           0.33       2022-09-12 [1] RSPM (R 4.2.0)
   xml2           1.3.3      2021-11-30 [1] RSPM (R 4.2.0)
   xopen          1.0.0      2018-09-17 [1] RSPM (R 4.2.0)
   xtable         1.8-4      2019-04-21 [1] RSPM (R 4.2.0)
   yaml           2.3.5      2022-02-21 [1] RSPM (R 4.2.0)

 [1] /home/pacha/R/x86_64-pc-linux-gnu-library/4.2
 [2] /usr/local/lib/R/site-library
 [3] /usr/lib/R/site-library
 [4] /usr/lib/R/library

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.