有时候开发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. Django----admin模块初识

    步骤1:创建管理员用户:在Terminal输入:pythonmanage.py createsuperuser 如下图所示说明创建成功 步骤二:运行项目文件:python manage.py runs ...

  2. .Net简单工厂模式,工厂模式,抽象工厂模式实例

    1.定义   简单工厂模式:是由一个工厂对象决定创建出哪一种产品类的实例.简单工厂模式是工厂模式家族中最简单实用的模式,可以理解为是不同工厂模式的一个特殊实现. 工厂模式:定义一个用于创建对象的接口, ...

  3. VB进行RGB分色

    Option Explicit Private Type RGBA R As Byte G As Byte B As Byte A As Byte End Type Private Declare S ...

  4. Java反射通过getter和setter方法实现类的拷贝

    private User copyFieldValues(User userData, User user) { Field[] fields = user.getClass().getDeclare ...

  5. IDEA_构建Maven项目报错(1)

    构建报错: [ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependenc ...

  6. (91)Wangdao.com第二十四天_Mutation Observer API 突变监视器

    Mutation Observer API 突变监视接口 用来监视 DOM 变动. DOM 的任何变动,比如节点的增减.属性的变动.文本内容的变动,这个 API 都可以得到通知 概念上,它很接近事件, ...

  7. Wireshark简单使用教程1——附视频

    目录 Wireshark的简介 Wireshark面向的用户 Wireshark的下载安装 Wireshark抓取一个流量包 内容 1.Wireshark的简介 Wireshark(前称Etherea ...

  8. 【java】i++与++i、i--运算

    package test; //i++与--i运算 public class test { public static void main(String[] args) { int b=0; int ...

  9. 数据结构-堆 Java实现

    数据结构-堆 Java实现. 实现堆自动增长 /** * 数据结构-堆. 自动增长 * */ public class Heap<T extends Comparable> { priva ...

  10. OO第二次阶段性总结

    前两次作业我都无效了……用了很久时间但还是没能弄明白多线程的写法,以后还是要学会即时的多问问会的同学吧…… 以及我的Mertrics在挣扎很久之后还是用不了……跪了 第七次作业 第七次作业能够完成的原 ...