Travis errors while chech() callback happens

As you can see in travis.yml, warnings are not treated as errors. When I do the check() in console, there are no errors. Here is the result:

0 errors ✓ | 4 warnings x | 1 note x

And here are the last lines of Travis CI.

ERROR: dependency ‘raster’ is not available for package ‘leaflet’
* removing ‘/home/travis/R/Library/leaflet’
* installing *source* package ‘modelr’ ...
** package ‘modelr’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (modelr)
* installing *source* package ‘tidyverse’ ...
** package ‘tidyverse’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (tidyverse)
The downloaded source packages are in
    ‘/tmp/RtmpX59PJA/downloaded_packages’
Warning messages:
1: In i.p(...) : installation of package ‘terra’ had non-zero exit status
2: In i.p(...) : installation of package ‘units’ had non-zero exit status
3: In i.p(...) : installation of package ‘raster’ had non-zero exit status
4: In i.p(...) : installation of package ‘sf’ had non-zero exit status
5: In i.p(...) :
  installation of package ‘leaflet’ had non-zero exit status
missing: terra, raster, units, leaflet, sf
The command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies = NA);remotes::install_deps(dependencies = TRUE);if (!all(deps$package %in% installed.packages())) { message("missing: ", paste(setdiff(deps$package, installed.packages()), collapse=", ")); q(status = 1, save = "no")}'" failed and exited with 1 during .
Your build has been stopped.

how do I get passed this step in travis as this is causing a hiccup in our company deploy?

The reason probably is that you do not tell Travis to install the required system dependencies (GDAL, GEOS). You need to add something to tell Travis like this to your system before installing these packages:

sudo apt-get install libgdal-dev libproj-dev libgeos-dev libudunits2-dev netcdf-bin

Should look like this:

addons:
  apt:
    packages:
      - libgdal-dev
      - libproj-dev
      - libudunits2-dev
      - netcdf-bin

See if this fixes your issue.

1 Like

it was netcdf-bin, thank you @montana!

Glad to hear I could be of assistance!

1 Like