控制台出现“The script has an unsupported MIME type ('text/html')”报错
有时候开发React或者Vue项目时,本地运行访问时,会莫名出现报错如下:
The script has an unsupported MIME type ('text/html')
这是由于无意中开启了service Workesr 功能,只要关掉即可解决。
步骤:
开发者工具 -> Application -> service Workers -> 展开Service workers from other domains -> 找到localhost域名项 -> 在右侧Unrigister注销 -> 最后刷新之前的项目页面即可。

控制台出现“The script has an unsupported MIME type ('text/html')”报错的更多相关文章
- Resource interpreted as Script but transferred with MIME type text/plain:
我用script做ajax跨域,请求返回的是个文本字符串,chrome提示:Resource interpreted as Script but transferred with MIME type ...
- Chrome 报 Resource interpreted as Script but transferred with MIME type text/plain 警告的解决办法
http://www.2cto.com/os/201312/262437.html 安装了VS2012之后,chrome在加载页面的时候会报 Resource interpreted as Scrip ...
- 使用JavaMail发送邮件-no object DCH for MIME type multipart/mixed报错解决
最近需要实现一个使用Spring schedule按一定时间间隔自动触发条件发送邮件的功能,在开发的过程中,是按照先测试能发出text/html文本邮件,然后测试添加附件发送邮件,我碰到的问题是,文本 ...
- 样式加载不出来,浏览器控制台报错:Resource interpreted as Stylesheet but transferred with MIME type text/html
写登录的时候出现的问题,样式时好时坏,浏览器控制台看到的信息是: Uncaught SyntaxError: Unexpected token <Resource interpreted as ...
- Refused to execute script from '....js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.md
目录 问题描述 解决过程 总结 问题描述 在整合 Spring Boot.Spring Security.Thymeleaf 的练习中,对页面进行调试时,发现如下错误提示: Refused to ex ...
- nginx: [warn] duplicate MIME type "text/html"错误
检查配置文件时提示:nginx: [warn] duplicate MIME type "text/html" in /home/web/nginx/inc/gzip.conf:9 ...
- Resource interpreted as Stylesheet but transferred with MIME type text/plain
今天碰到了Resource interpreted as Stylesheet but transferred with MIME type text/plain 这个错误. 原因:在web中配置了f ...
- because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checkin
1 前言 浏览器报错误(chrome和firefox都会):because its MIME type ('text/html') is not a supported stylesheet MIME ...
- Resource interpreted as Stylesheet but transferred with MIME type text/html: css失效
异常信息: Resource interpreted as Stylesheet but transferred with MIME type text/html: 可能原因 过滤器或者某个地方对所有 ...
随机推荐
- 关于getchar-scanf函数的相关坑!
首先,我们编写如下所示的代码: #include <stdio.h> void test(int n) { ; ; ; a = b; b = c; c = n; printf(" ...
- Promise源码深入理解
) ) }); ) }, ) }); ) ) }, ) }); ) }, ) }); p.then(function (x) { console.log(x) }) //输出 1 链式调用1 链式调用 ...
- 二分三元组 CodeForces - 251A
题目链接: https://vjudge.net/problem/35188/origin 题目大意: 要求你找到一个 i < j < k时有 a[k]-a[i] <= d的组的个数 ...
- PBRT笔记(1)——主循环、浮点误差
PBRT2与3之间的改动 增加了一个功能完备的BRDF模型,支持体积光照与重要性多重路径采样. 次表面散射,基于光线追踪技术,无需预处理. 解决浮点数四折五入的问题 光子映射 样本生成 第一章多了讲并 ...
- selenium3 TestNG 介绍与配置
一.TestNG介绍 我之前有学习过Junit,Nunit 这些工具,现在想看看TestNG,那么TestNG是什么呢?他们之间有什么区别呢? TestNG(Next Generation)是一个测试 ...
- ECMA Script 6_必须要知道的基础
ES6 为了保持兼容性,var 命令和 function 命令声明的全局变量,依旧是顶层对象的属性: 另一方面规定,let 命令.const 命令.class 命令声明的全局变量,不属于 window ...
- (97)Wangdao.com_第三十天_触摸事件
触摸事件 只有触摸屏才会引发这一类事件 触摸事件 和 鼠标事件 同时触发,即使这个时候并没有用到鼠标. 这是为了让那些只定义鼠标事件.没有定义触摸事件的代码,在触摸屏的情况下仍然能用. 如果想避免这种 ...
- tp5.0与mysql存储过程
存储过程是一组预编译的sql语句,只需要创建一次过程,以后在程序中就可以调用该过程任意次,执行的速度快于普通sql语句,对于没有权限执行存储过程的用户,也可授权他们执行存储过程,存储过程是保存在数据库 ...
- 5、faker.js数据模拟
转载于:https://segmentfault.com/a/1190000008574028 今天发现了一个神器--json-server!在他的帮助下可以在很短的时间内搭建一个Rest API, ...
- 输入二进制数转换成十进制数(在cin>>和cin.get()上掉的坑)
题目:输入一个二进制数转换成十进制. 题目分析:书上说,在一般情况下,c++的键盘输入可以识别是十进制数.八进制数和十六进制数,因此输入的二进制数据要作为字符处理.(其实我觉得数字也没问题吧). 正确 ...