【问题标题】:React Native dev server script MIME type ('application/octet-stream')React Native 开发服务器脚本 MIME 类型('application/octet-stream')
【发布时间】:2021-08-11 18:09:31
【问题描述】:

我在启动 react-native 开发服务器、连接设备和调试时收到以下错误。

Refused to execute script from 'http://localhost:8086/index.android.bundle?platform=android&dev=true&minify=false' because its MIME type ('application/octet-stream') is not executable, and strict MIME type checking is enabled.

谁能帮助我了解如何更改从 Metro bundler 提供的捆绑文件的 mime 类型?

【问题讨论】:

    标签: react-native metro-bundler


    【解决方案1】:

    我删除了我的顶级 react-native 文件夹并再次克隆了我的存储库。之后,当我执行 npm install 并运行我的开发服务器时,一切正常。

    我仍然不知道是什么原因造成的,以及是什么解决了这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-19
      • 2012-03-31
      • 2012-04-16
      • 1970-01-01
      • 2012-07-28
      • 2015-08-29
      • 2018-09-11
      • 2021-11-15
      相关资源
      最近更新 更多