[SalesForce] CSS/Javascript static resources not loading

I've loaded css/js static resources to Salesforce in a fivestar.zip file. This resource also contains an svg.

fivestar.zip
–rating.css
–rating.js
–stars.svg

When attempting to load these resources via

<ltng:require styles="{!$Resource.fivestar + '/rating.css'}" 
              scripts="{!$Resource.fivestar + '/rating.js'}"
              afterScriptsLoaded="{!c.afterScriptsLoaded}" />

I'm getting the following 404 errors via Chrome console :

GET https://curious-badger-85919-dev-ed.lightning.force.com/resource/1534019843000/fivestar/rating.js 404 (Not Found)

and

GET https://curious-badger-85919-dev-ed.lightning.force.com/resource/1534019843000/fivestar/rating.css 404 (Not Found)

I'm assuming this has to do with my ltng:require tag being incorrect, which is why I haven't included other code.

Best Answer

Your tag seems correct, its your file path that seems to be off, mind sharing your zip file tree structure?

Did you zip the files directly, or you zipped a filder that contains these 3 files? if the later is your case, then your reference should be something similar to the below:

<ltng:require 
    styles="{!$Resource.fivestart+ 'toplevelfolder/rating.css'}"
    scripts="{!$Resource.fivestart+ 'toplevelfolder/fivestar.js'}"
    afterScriptsLoaded="{!c.scriptsLoaded}" />