今天客户要求看一下数据大屏开发到那里了,于是走流程项目打包发布,然后懵逼了,无法正常访问,排查后发现报错了。
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "font/otf". Strict MIME type checking is enforced for module scripts per HTML spec.
install-8c5fcaca.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "font/otf". Strict MIME type checking is enforced for module scripts per HTML spec.
images.wanjunshijie.com/demo/shujudaping/zhihuidianlan/assets/dayjs.min-7e925c81.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "font/otf". Strict MIME type checking is enforced for module scripts per HTML spec.
pinia-f2cc314b.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "font/otf". Strict MIME type checking is enforced for module scripts per HTML spec.
runtime-dom.esm-bundler-c5e20a7a.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "font/otf". Strict MIME type checking is enforced for module scripts per HTML spec.
原本的js文件变为了字体文件,导致无法加载。
但是自己也不知道咋解决,于是去七牛平台提交工单请求帮助,工程师反应很快,提交工单后,就很快响应了,但是工程师那边反馈说没有问题。
经过一顿排查,工程师让刷新一下缓存,刷新缓存后好了。不知道工程师那边有没有调整,反正问题解决可以正常访问了。
刷新缓存
1、CDN 刷新缓存方法请参考:CDN 刷新缓存
方法1: portal.qiniu.com 控制台刷新缓存,点击左侧融合cdn => 刷新预取
方法2: api 接口地址:api 接口地址
Tip : url 刷新,全网生效 10min 左右,目录刷新需要 30min 左右
2、清除本地缓存方法
添加随机参数进行访问 或者 禁用浏览器缓存