I keep getting errors on daily. The output: a raster image with calculating monthly CHIRPS rainfall between January 1980 -December 2018 for Sierra Leone (SLE is the ISO code).

// Set years and month
var startYear = 1980;
var endYear = 2018;
var years = ee.List.sequence(startYear, endYear);
var months = ee.List.sequence(1,12);
// load the image collection
//Import gaul-minus-water as table
//Import CHIRPS daily as Daily

var iso3 = 'SLE';
table = table.filter(ee.Filter.eq('ISO3_code', iso3 ));

// make monthly summed mosaics
// loop over the years and months to get summed monthly images
var byMonth = ee.ImageCollection(ee.FeatureCollection(years.map(function(y){
  var yearCollection = Daily.filter(ee.Filter.calendarRange(y, y, 'year'));
  var byYear = ee.ImageCollection.fromImages(
    months.map(function(m) {
      var summedImage = yearCollection.filter(ee.Filter.calendarRange(m, m, 'month'))
      var date = ee.Date.fromYMD(y, m, 1).format("MM_dd_YYYY");
      return summedImage.set('system:time_start', ee.Date.fromYMD(y, m, 1)).rename(date);
      //.set('month', m).set('year', y); // eventually set year and month 
  return byYear;

// filter the empty one out
var outputMonthly = byMonth.filter(ee.Filter.listContains('system:band_names', 'constant').not())

var imageclip = outputMonthly.clip(table); 


var proj = 'EPSG:4326'
var desc = 'Total_Precip'
  image: imageclip,
  scale: 1000,
  crs: proj,
  • Please add details on the error message and provide a link to a working script. – Daniel Jan 1 at 19:41