Node/Express - Refused to apply style because its MIME type ('text/html')

后端 未结 5 1114
孤城傲影
孤城傲影 2020-12-15 22:24

I\'ve been having this issue for the past couple of days and can\'t seem to get to the bottom of this. We doing a very basic node/express app, and are trying to serve our st

5条回答
  •  甜味超标
    2020-12-15 22:34

    The problem is the result of an improperly named file. Our student had a space at the end of the style.css file. There were a few tip offs to this, the first was a lack of syntax highlighting in the text editor, and the second was the text editor detecting the filetype for other newly created css files but not the improperly named file. Removing the space resolved the issue.

    Thank you slebetman for your help in pointing me in the right direction.

提交回复
热议问题