MIME类型不是可执行文件?

问题描述

我已经构建了一个React + Django应用程序,我使用Elastic Beanstalk将其托管在AWS上。在“成功构建”之后,在访问环境URL时出现此错误

<table>

我的互联网研究即将枯竭。我已经能够知道Elastic Beanstalk是sniffing我的Refused to execute script from 'http://hihome-app.eba-w5sjpmj3.us-west-2.elasticbeanstalk.com/static/frontend/main.js' because its MIME type ('text/html') is not executable,and strict MIME type checking is enabled. 吗?并且“ 许多HTTP服务器提供的Content-Type头字段值与响应的实际内容不匹配。”(请参阅​​sniffing)因此,Elastic Beanstalk不是我的朋友。 / p>

这是main.js引入的index.html:

main.js

<body> <div id="root"></div> {% load static %} <script src="{% static "frontend/main.js" %}" ></script> 文件的长度超过1000行,因此无法发布。它是在我的main.js中使用此配置生成的:

package.json

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)