-
-
Notifications
You must be signed in to change notification settings - Fork 50
Packages are not found after R upgrade
Lorenz Walthert edited this page May 19, 2024
·
11 revisions
For example if you see
Error in loadNamespace(x) : there is no package called ‘docopt’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
After an R minor or major upgrade, pre-commit may wants to use old and incompatible binaries / installed packages.
You need to destroy the invalid links and let pre-commit link these again with the correct version.
- run
pre-commit cleanto delete the pre-commit cache. - run
pre-commit install --install-hooks - try to commit again.
- if it fails, install the package manually with renv (so it's added to the cache) with
renv::install('docopt'). - try to commit again.