Hi, I recently updated my netlify website https://rr0.netlify.app and the CSS fails to display… because it has been compiled as a… js file (furthermore, the file is empty), whereas the original line is just
<link rel="stylesheet" href="/rr0.css" type="text/css"/>
What could cause the css file to be minified by Netlify as an (empty) js file? The original CSS file can be found here (the website is deployed from github).
It is not the first time it happens: sometimes it works, sometimes it doesn’t.
See this build log for instance : Netlify App
Note that the “not found” file errors are “normal”, as well as the redirect warnings were always there. i.e. they were there even when it worked.
Hi @rr0, thanks for posting and welcome.
1:40:02 PM: Error: ENOENT: no such file or directory, stat ‘/opt/build/repo/fooer.html’
Your build log has the following error above. Your project contains a
footer.html file instead of
Kindly fix that with the method you are using to export your html files since it’s probably a typo.
Also when your files are exported, note the output directory of the
rr0.css file so that you can use the appropriate path for your
Kindly make the above changes and let me know the outcome.
This seems to have fixed to problem, indeed; thanks a lot! (didn’t need to change the rr0.css href since it was ok before).
However I still don’t understand how this could lead to replacing a .css file with a generated empty js file. A netlify bug (in case of some build error) maybe?
Thanks for the feedback @rr0. Glad to know my suggestions helped you to resolve the problem.
Regarding your question, one error can lead to many other problems in your site during deployment and it’s not limited to only Netlify. Anytime you are deploying to any platform, one error can cause a domino effect of other errors to occur since files and configurations are linked together.
Think of it this way, a vehicle functions once every part is in place. The moment you take one important part out, the vehicle can still move when you push it. However the vehicle will not function (move on it’s own when every important part is in place) as the way its supposed to function.
Hope the analogy makes sense.