MIME type error with express.static and CSS files

前端 未结 3 1973
温柔的废话
温柔的废话 2021-01-12 05:48

I\'m using express and node. In my server.js file I have this piece of code:

app.use(express.static(\'/static\'));

And subsequ

3条回答
  •  借酒劲吻你
    2021-01-12 06:29

    In my case it was what Luca Kiebel said:

    The MIME Type Error is happening because the file served is likely a "404 Not Found" page made by Express, because it couldn't locate the file.

    Just click the link from the debug Console in your browser and see what it actually returns.

提交回复
热议问题