React Native dev server script MIME type ('application/octet-stream')

Viewed 163

I am getting the following error when I start my react-native dev server, connect a device, and debug.

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.

Can anyone please help me understand how to change the mime type of bundle file served from metro bundler?

1 Answers

I deleted my top-level react-native folder and cloned my repository again. After that, everything worked when I did npm install and ran my dev server.

I still don't know what caused and what fixed the issue.

Related