CSS not loading


#1

New to Vapid and kind of a junior programmer. Can anyone tell me why my site isn’t loading my CSS? It’s fine on the localhost but the deployed site isn’t showing up how I’d like it to. Here is the error code I get:

“Refused to apply style from ‘https://coreycreativ.vapid.site/stylesheets/site.css’ because its MIME type (‘text/html’) is not a supported stylesheet MIME type, and strict MIME checking is enabled.”

The site: https://coreycreativ.vapid.site/

Thanks


#2

@coreo881 Thanks for submitting this. Looks like it might be a bug. Can you please tell me a little about the system you’re using:

  • OS: [e.g. OS X, Windows]
  • Node Version [e.g. 8.11.1]
  • Vapid Version [e.g. 0.1.24, found in package.json]

#3

Sure.

OS: Windows 10
Node Version: 8.9.0
Vapid Version: 0.2.2

Quick note: right after I created the sample site, I immediately changed the name from whatever it was, to coreycreativ.vapid.site

After doing some research, it looks like people have been getting similar errors outside of Vapid because something has been misreferenced. So maybe the name change could have caused that?

Here’s the Stack Overflow link I’m referring to: https://stackoverflow.com/questions/48248832/stylesheet-not-loaded-because-of-mime-type


#4

Thanks for the info. I’m pretty sure I know what’s causing this. It appears to be an issue with translating Windows file paths to Unix. e.g. javascripts\site.js to javascripts/site.js. If that’s the case, I should be able to fix it server-side. I’ll look into it this weekend, and will get back to you when I’ve got a fix.


#5

Try redeploying now. It should be fixed. :crossed_fingers:


#6

Just deployed and it works now. Thanks!


#7

Hello! i’ve got the same problem, just deployed my site but css, js and some images are giving 404 even the path seems to be good (https://mysite.vapid.site/javascripts/site.js).
Any clue?
Thanks


#8

@Jack89ita Replying to you now in a private message.