简体   繁体   English

无法为 scope 注册 ServiceWorker - 脚本具有不受支持的 MIME 类型 ('text/html')

[英]Failed to register a ServiceWorker for scope - The script has an unsupported MIME type ('text/html')

Im getting this message in the console when I view the production site.当我查看生产站点时,我在控制台中收到此消息。 Running locally everything is registers perfectly and all the lighthouse checks pass in chrome dev tools.在本地运行一切都是完美的注册,所有的灯塔检查都通过了 chrome 开发工具。

Ive tried trouble shooting following the following threads but no luck: Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html') Vue js?我尝试按照以下线程进行故障排除,但没有运气: 无法注册 ServiceWorker:脚本具有不受支持的 MIME 类型('text/html')Vue js? Service Worker registration error: Unsupported MIME type ('text/html') Service Worker 注册错误:不支持的 MIME 类型('text/html')

Any help would be appreciated as I would really like to run this as a PWA.任何帮助将不胜感激,因为我真的很想将其作为 PWA 运行。 Here is a link to the full repo https://github.com/brianlfarmerllc/React_PWA_ReadMeFormatter这是完整回购https://github.com/brianlfarmerllc/React_PWA_ReadMeFormatter的链接

I can provide code snippets if that is more helpful如果这更有帮助,我可以提供代码片段

The problem actually fixed itself when I push to heroku a second time.当我第二次推送到 heroku 时,问题实际上已经解决了。 Really not sure what the fix/glitch was but it is resolved.真的不确定修复/故障是什么,但它已解决。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 注册 ServiceWorker 失败:脚本具有不受支持的 MIME 类型 ('text/html') - Failed to register a ServiceWorker: The script has an unsupported MIME type ('text/html') MSW:无法使用脚本为范围注册 ServiceWorker 该脚本具有不受支持的 MIME 类型('text/html') - MSW: Failed to register a ServiceWorker for scope with script The script has an unsupported MIME type ('text/html') 注册 ServiceWorker 失败:脚本的 MIME 类型不受支持 - reactjs - Failed to register a ServiceWorker: The script has an unsupported MIME type - reactjs CRA - 无法注册 ServiceWorker,不支持的 MIME 类型 ('text/html') - CRA - Failed to register a ServiceWorker, unsupported MIME type ('text/html') 注册时的 ServiceWorker MIME 类型错误 ('text/html') (React) - ServiceWorker MIME Type Error ('text/html') on register (React) 模拟服务器错误 - 脚本具有不受支持的 MIME 类型 ('text/html') - Mock server error - The script has an unsupported MIME type ('text/html') Firebase TypeScript 上的 FCM:“脚本具有不受支持的 MIME 类型('text/html') - Firebase FCM on TypeScript: "The script has an unsupported MIME type ('text/html') FirebaseError browserErrorMessage:“无法注册 ServiceWorker:ServiceWorker 脚本评估失败” - FirebaseError browserErrorMessage: "Failed to register a ServiceWorker: ServiceWorker script evaluation failed" Service Worker 注册错误:不支持的 MIME 类型('text/html') - Service Worker registration error: Unsupported MIME type ('text/html') firebaseerror:无法注册ServiceWorker - firebaseerror: Failed to register a ServiceWorker
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM