JasonBoy / koa-web-kit

🚀A Modern, Production-Ready, and Full-Stack Node Web Framework with React
MIT License
214 stars 41 forks source link

如何解决chrome 报错问题? #33

Closed fively closed 5 years ago

fively commented 5 years ago

请问,在chrome浏览器提示的错误,访问http://localhost:3000/serviceWorker.js报错, 报错内容: The script has an unsupported MIME type ('text/html'). Failed to load resource: net::ERR_INSECURE_RESPONSE

JasonBoy commented 5 years ago

这是个自定义的文件?还是哪来的?你是npm run dev启动的么?

fively commented 5 years ago

是使用chrome浏览器打开的时候提示的。采用的是 npm run dev启动的。其他的浏览器我看了 没这个错误提示

JasonBoy commented 5 years ago

我这边console里没有的,不知道你这哪来的。 可能你的3000端口之前开过其他用servive worker的项目,然后这边缓存又去拿了

fively commented 5 years ago
WechatIMG463

启动之后,chrome浏览器打开后,点击刷新按钮,就会提示

JasonBoy commented 5 years ago

你用隐身模式试一下会不会有

fively commented 5 years ago

这个就没错误的提示了。 我是个新手,请教下,这个是什么原因?

JasonBoy commented 5 years ago

把缓存清掉

fively commented 5 years ago

好的,我再试试。 感谢!