MIME类型错误-将React App部署到Heroku

时间:2019-08-20 00:35:37

标签: reactjs heroku deployment

我在heroku上部署了一个react应用,它不再工作了。

error正在发生

我以为是因为某些环境变量没有传递给heroku而发生的。但这似乎与样式表有关。

错误消息:

Refused to apply style from 'https://twobudget.herokuapp.com/2budget/static/css/2.e15833e6.chunk.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
2.211252ea.chunk.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
main.a8362adb.chunk.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
2.211252ea.chunk.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
main.a8362adb.chunk.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
(index):1 Refused to apply style from 'https://twobudget.herokuapp.com/2budget/static/css/2.e15833e6.chunk.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

我的存储库:https://github.com/LauraBeatris/2budget

0 个答案:

没有答案