有时候开发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')”报错的更多相关文章

  1. Resource interpreted as Script but transferred with MIME type text/plain:

    我用script做ajax跨域,请求返回的是个文本字符串,chrome提示:Resource interpreted as Script but transferred with MIME type ...

  2. 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 ...

  3. 使用JavaMail发送邮件-no object DCH for MIME type multipart/mixed报错解决

    最近需要实现一个使用Spring schedule按一定时间间隔自动触发条件发送邮件的功能,在开发的过程中,是按照先测试能发出text/html文本邮件,然后测试添加附件发送邮件,我碰到的问题是,文本 ...

  4. 样式加载不出来,浏览器控制台报错:Resource interpreted as Stylesheet but transferred with MIME type text/html

    写登录的时候出现的问题,样式时好时坏,浏览器控制台看到的信息是: Uncaught SyntaxError: Unexpected token <Resource interpreted as ...

  5. 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 ...

  6. nginx: [warn] duplicate MIME type "text/html"错误

    检查配置文件时提示:nginx: [warn] duplicate MIME type "text/html" in /home/web/nginx/inc/gzip.conf:9 ...

  7. Resource interpreted as Stylesheet but transferred with MIME type text/plain

    今天碰到了Resource interpreted as Stylesheet but transferred with MIME type text/plain 这个错误. 原因:在web中配置了f ...

  8. 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 ...

  9. Resource interpreted as Stylesheet but transferred with MIME type text/html: css失效

    异常信息: Resource interpreted as Stylesheet but transferred with MIME type text/html: 可能原因 过滤器或者某个地方对所有 ...

随机推荐

  1. python 字符串常用操作

    字符串常用方法 capitalize() String.capitalize() 将字符串首字母变为大写 name = 'xiaoming' new_name = name.capitalize() ...

  2. PostgreSQL自学笔记:8 查询数据

    8 查询数据 8.1 基本查询语句 select语句的基本格式是: select {* | 字段1[,字段2,...]} [ from 表1,表2... [where 表达式] [group by & ...

  3. TCP/IP协议、HTTP协议、SOCKET通讯详解

    1.TCP连接TCP(Transmission Control Protocol) 传输控制协议.TCP是主机对主机层的传输控制协议,提供可靠的连接服务,采用三次握确认建立一个连接.位码即tcp标志位 ...

  4. Tutorial中的Hello2代码

    该hello2应用程序是一个Web模块,它使用Java Servlet技术来显示问候语和响应. 1.GreetingServlet.java源码文件: 1 @WebServlet("/gre ...

  5. React(一)使用脚手架创建React项目

    1.安装脚手架 现在使用较多的就是这三种脚手架工具: react-boilerplate react-redux-starter-kit create-react-app 我使用的是第三种,faceb ...

  6. 21 ArcMap 10.6.1 添加Excel格式数据

    注:此次的操作软件为ArcMap10.6.1,在ArcMap其它版本中也可使用,如遇到问题,欢迎交流. 1:Excel中数据(点)标准化(一般是经纬度),将原来的度分秒表示的都要转换成度表示的,如图所 ...

  7. jetty服务器原理与maven集成

    jetty服务器原理+MyEclipse下与Maven集成 Jetty 是一个开源的servlet容器,它为基于Java的web容器,例如JSP和servlet提供运行环境.Jetty是使用Java语 ...

  8. 遍历文件后缀名 为 .java的文件

    import java.io.File; import java.io.FileFilter; //创建一个功夫类继承文件管理类 public  class FileFu implements Fil ...

  9. nregistering JMX-exposed beans

    https://blog.csdn.net/yang474231561/article/details/81738632 https://stackoverflow.com/questions/507 ...

  10. Java+Selenium向文本框输入内容以后模仿键盘的"ENTRY"

    在自动化测试中我们避免不了要模仿一些键盘上按钮的操作,普通的字母,数字,特殊符号,这些都是很简单的,有时候我们也会模仿"SHIFT","ALT","C ...