You need to sign in to do that
Don't have an account?
Chadwick Sakonchick
Error loading requires on Lightning Components
I'm testing a calendar that pulls from a custom object and displays its records. I'm getting a blank page when I load my harness app and it seems I'm not loading my requires properly. Here is the error I'm seeing in Chrome's console
Here is how i'm calling the requires via fullCalendar.cmp.
Refused to load the stylesheet 'https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,300' because it violates the following Content Security Policy directive: "style-src https://d1j5o6e2vipffp.cloudfront.net https://dzdsh0uck5hox.cloudfront.net https://extension-local.mixmax.com https://livereload-extension-local.mixmax.com https://api.keen.io/ https://*.intercom.io/ https://*.intercomcdn.com/ https://*.facebook.net https://*.facebook.com https://*.twitter.com 'self' chrome-extension: 'unsafe-inline'". Failed to load resource: the server responded with a status of 404 (Not Found) https://poseidonimaging-dev-ed.lightning.force.com/resource/1484095772000/FullCalendarCSS/fullcalendar.css Failed to load resource: the server responded with a status of 404 (Not Found) https://poseidonimaging-dev-ed.lightning.force.com/resource/1484095745000/FullCalendarJS/fullcalendar.js Failed to load resource: the server responded with a status of 404 (Not Found) https://poseidonimaging-dev-ed.lightning.force.com/resource/1484095772000/FullCalendarCSS/fullcalendar.css
Here is how i'm calling the requires via fullCalendar.cmp.
<aura:component controller="FullCalendarController" implements="force:appHostable"> <ltng:require styles="{!$Resource.FullCalendarCSS + '/fullcalendar.css'}" scripts="{!join(',', $Resource.FullCalendarJS + '/fullcalendar.js', $Resource.jQuery + '/jquery.min.js', $Resource.MomentJS + '/moment.min.js')}" afterScriptsLoaded="{!c.scriptsLoaded}"/> <aura:attribute name="events" type="Booking__c[]" /> <div id="calendar"></div> </aura:component>
Failed to load resource: the server responded with a status of 404 (Not Found) https://poseidonimaging-dev-ed.lightning.force.com/resource/1484095772000/FullCalendarCSS/fullcalendar.css Failed to load resource: the server responded with a status of 404 (Not Found) https://poseidonimaging-dev-ed.lightning.force.com/resource/1484095745000/FullCalendarJS/fullcalendar.js
If not, please check and upload these 2 files: fullcalendar.css and fullcalendar.js so that the component is able to use these to display the component on the UI.