控制台出现“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: 可能原因 过滤器或者某个地方对所有 ...
随机推荐
- 表单组件 form fastadmin(生成表单元素)
Form组件 定义文件位置: /extend/fast/Formphp 通用参数 $name 通常为我们组件的名称(name属性值),我们在后台接收时可以通过这个名称来获取到它所对应的值 $value ...
- js事件循环机制 (Event Loop)
一.JavaScript是单线程单并发语言 什么是单线程 主程序只有一个线程,即同一时间片断内其只能执行单个任务. 为什么选择单线程? JavaScript的主要用途是与用户互动,以及操作DOM.这决 ...
- ASP.NET Core 3.0预览版体验
目前.NET Core 3.0的版本为.NET Core 3.0 Preview 3,对应ASP.NET Core 3.0 Preview 3. ASP.NET Core 3.0 之后将不再支持.NE ...
- Linux 下执行本目录的可执行文件(命令)为什么需要在文件名前加“./”
一.PATH 是环境变量,里面保存了执行文件路径(通常会包含多个路径,各路径之间以冒号":"进行间隔).当执行一个可执行文件(命令)时,Linux 会优先到 PATH 环境变量中保 ...
- 微信小程序免费Https获取以及Ubuntu Nginx配置
先贴上Nginx的配置文件 user www-data; worker_processes auto; pid /run/nginx.pid; events { worker_connections ...
- 08-Xml & Tomcat
Xml & Tomcat Xml >eXtendsible markup language 可扩展的标记语言 XML 有什么用? 1. 可以用来保存数据 2. 可以用来做 ...
- FloatingActionButton的使用
- [05-02]红帽linux常用操作命令
命令怎么用(三种方式) shutdown --help shutdown --? man shutdown (man 就是manual 手册, 指南) 服务 service 怎么知道服务的名字呢? ...
- 【Python基础】lpthw - Exercise 43 基本的面向对象分析和设计
1. A game from sys import exit from random import randint from textwrap import dedent # 使可以使用三引号型的字符 ...
- Go笔记
#Go在win下安装 1. https://golang.google.cn/dl/下载 amd64 版本的zip包 2. 解压后将bin目录添加入path 3. go version可显示版本信息