title: Fullcalendar Resources not showing in version 4
body: <p>I was using resources well in fullcalendar version 3.  I'm moving to version 4 and had some breaking changes.   I can get the calendar to show my events properly but once I start to add resources, I get this error in my console:</p>
  
  <pre><code>main.js:145 Uncaught TypeError: Cannot read property 'ResourceDayGrid' of undefined
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>document.addEventListener('DOMContentLoaded', function() {
  
      var calendar_full = document.getElementById('calendar_full');
  
      var calendar = new FullCalendar.Calendar(calendar_full, {
          selectMirror: true,
          plugins: ['interaction', 'resourceDayGrid', 'resourceTimeGrid'],
          header: {
              right: 'prevYear,prev,next,today,nextYear',
              center: 'title',
              left: 'resourceTimeGridDay,resourceTimeGridTwoDay,timeGridWeek,dayGridMonth'
          },
          views: {
              resourceTimeGridTwoDay: {
                  type: 'resourceTimeGrid',
                  duration: {
                      days: 2
                  },
                  buttonText: '2 days',
              }
          },
          defaultView: 'resourceTimeGridDay',
          datesAboveResources: true,
          editable: true,
          slotDuration: "&lt;?php echo $location-&gt;data()-&gt;calendar_slot_duration; ?&gt;",
          snapDuration: "&lt;?php echo $location-&gt;data()-&gt;calendar_snap_duration; ?&gt;",
          nowIndicator: true,
          minTime: "&lt;?php echo $location-&gt;data()-&gt;calendar_start; ?&gt;",
          maxTime: "&lt;?php echo $location-&gt;data()-&gt;calendar_end; ?&gt;",
          hiddenDays: $.parseJSON('[' + "&lt;?php echo $location-&gt;data()-&gt;calendar_hide_days_of_week; ?&gt;" + ']'),
          //            groupByResource: true,
          eventLimit: true,
          schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
          events: {
              url: 'ajax_get_json.php?what=location_appointments'
          },
          resources: [{
                  id: '1',
                  title: 'Room A'
              },
              {
                  id: '2',
                  title: 'Room B'
              }
          ]
      });
  
      calendar.render();
  
  })
  </code></pre>
  
  <p>Here's an event JSON response example:</p>
  
  <pre><code>allDay: false
  color: "#FFD700"
  company_id: "1"
  date_created: "2018-12-05 09:35:32"
  start: "2019-04-30 14:00:00"
  end: "2019-04-30 14:00:00"
  id: "22218"
  resourceId: "1"
  </code></pre>
  
  <p>If I change the default view to something that doesn't rely on resources, the calendar DOES show with all events.  So this will render the calendar:</p>
  
  <pre><code>defaultView: 'dayGridMonth'
  </code></pre>
  
  <p>When I use defaultViews that use resources, I get the error.  </p>
  
  <p>Not sure how to troubleshoot this.</p>
  
  <p>UPDATED TO ADD FOLLOWING SCRIPT INCLUDES:</p>
  
  <pre><code>&lt;link href="added-assets/plugins/fullcalendar-4.0.2/packages/core/main.css" rel="stylesheet" /&gt;
  &lt;link href="added-assets/plugins/fullcalendar-4.0.2/packages/daygrid/main.css" rel="stylesheet" /&gt;
  &lt;link href="added-assets/plugins/fullcalendar-4.0.2/packages/timegrid/main.css" rel="stylesheet" /&gt;
  
  &lt;script src="added-assets/plugins/fullcalendar-4.0.2/packages/core/main.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="added-assets/plugins/fullcalendar-4.0.2/packages/daygrid/main.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="added-assets/plugins/fullcalendar-4.0.2/packages/interaction/main.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="added-assets/plugins/fullcalendar-4.0.2/packages/timegrid/main.js" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;script src="added-assets/plugins/fullcalendar-4.0.2/packages/resource-common/main.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="added-assets/plugins/fullcalendar-4.0.2/packages/resource-timegrid/main.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="added-assets/plugins/fullcalendar-4.0.2/packages/resource-daygrid/main.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>ALSO, if it helps: I traced the error to the following line from the console error (the ResourceDayGrid function has the error):</p>
  
  <pre><code>_this.resourceTimeGrid = new ResourceTimeGrid(context, _this.timeGrid);
      if (_this.dayGrid) {
          _this.resourceDayGrid = new resourceDaygrid.ResourceDayGrid(context, _this.dayGrid);
      }
  </code></pre>