thlorenz / brace

📔 browserify compatible version of the ace editor.
http://thlorenz.github.io/brace/
MIT License
1.06k stars 304 forks source link

Cannot set mode due to possible incorrect MIME type on request #116

Open johnslipper opened 6 years ago

johnslipper commented 6 years ago

Hi there. I'm getting the following error trying to set the editor mode to JSON using the .setMode("brace/mode/json") function:

refused to execute script from 'https://localhost:8000/mode-json.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Could this be that the service worker request does not have the correct MIME type?

walstper commented 6 years ago

If question is still actual - this can happen if you pass incorrect 'mode' value. Check it's validity.