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

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.
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?
Service Worker registration error: Unsupported MIME type ('text/html')
Any help would be appreciated as I would really like to run this as a PWA. Here is a link to the full repo
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. Really not sure what the fix/glitch was but it is resolved.

Related

Observing error while running Gatling project 'object gatling is not a member of package io'

I m seeing the following error while running Engine.scala
object gatling is not a member of package io import io.gatling.app.Gatling
Below is the code that is used
`import io.gatling.app.Gatling
import io.gatling.core.config.GatlingPropertiesBuilder
object Engine extends App {
val props = new GatlingPropertiesBuilder()
.resourcesDirectory(IDEPathHelper.mavenResourcesDirectory.toString)
.resultsDirectory(IDEPathHelper.resultsDirectory.toString)
.binariesDirectory(IDEPathHelper.mavenBinariesDirectory.toString)
Gatling.fromMap(props.build)
}`
I tried changing the Gatling version in mvn file, but no luck. could someone please help
It means the Gatling jars are not properly imported in your classpath.
No idea how to help you though as you're not describing exactly what you're doing and how you're getting this error: when running maven from the command line? when running from IntelliJ? or another IDE?
Note: if you're struggling with properly setting up a development environment for Scala, you should probably consider using Gatling with Java instead, where the set up is way more simple.

Type error: cannot find module '...' or its corresponding type declarations

I've been trying to deploy my next.js app on Vercel, but got "Type error: cannot find module '...' or its corresponding type declarations" error. My guess is it happened with local module(React Component) and .tsx and .ts files. Because I didn't get this error when I deployed the last version without typescript.
In development mode the app able to find the modules and execute the code effectively without any error.
I don't know if I'm too late. I hope this help :)
Vercel deploy / build fail. "Failed to compile. Type error: Cannot find module ... or its corresponding type declarations
or you can look at this issue
https://github.com/vercel/next.js/issues/11742

CRA - Failed to register a ServiceWorker, unsupported MIME type ('text/html')

I am getting the following error when publishing my create react app but the error doesn't appear locally. I recently updated my React version and a load of packages too. I'm guessing it's possibly something to do with that as I've never had this issue before?
Error during service worker registration: DOMException: Failed to register a ServiceWorker for scope ('https://**subdomain**.azurewebsites.net/') with script ('https://**subdomain**.azurewebsites.net/service-worker.js'): The script has an unsupported MIME type ('text/html').
Any input on this will be greatly appreciated. The error doesn't appear to be breaking anything from what I can see but I'd rather not push this to production with any kind of errors
So turns out the issue was because I updated the react version. CRA doesn't have service workers out of the box anymore. The project was returning 'unsupported MIME type ('text/html')' because it was hitting 404 looking for a file that doesn't exist.
The fix was relativly simple.
I replaced the registerServiceWorker() in my index.js file with reportWebVitals(). I then added reportWebVitals.js to my src folder. (I just created a temp react project and pulled the file from that). After I did that it started to work for me. I think I also had to npm install web-vitals.

error trying to load the config "relay" for the macro imported from "babel-plugin-relay/macro"

We are trying to upgrade our react project to latest packages including relay (7.0.0). Our application builds and works but we are getting this error message in the console (during build) on every file where we import graphql from 'babel-plugin-relay/macro'. We are doing exactly like documented here adding relay
The error is "There was an error trying to load the config "relay" for the macro imported from "babel-plugin-relay/macro. Please see the error thrown for more information." It is coming from \node_modules\babel-plugin-macros\dist\index.js in getConfig( ).
To understand how other projects were configured, I downloaded another sample relay project / installed it and it had the same problem. Interesting enough there was this recent post in that app's issues list error loading config
The solution noted worked for me (adding that noted .babel-plugin-macrosrc.yml file with empty relay plugin?) but I am not understanding why this is needed or what was causing this seemingly benign error message?

prism5 wpf View-Switching Navigation QuickStart demo doesn't run

I'm new to PRISM, and downloaded the quickstart demos, and tried the View Switching Navigation.
i could build the solution, there is no error there, but when i try to run the application it gives error that cannot load CalendarModule.dll.
An unhandled exception of type 'Microsoft.Practices.Prism.Modularity.ModuleTypeLoadingException' occurred in Microsoft.Practices.Prism.Composition.dll
Additional information: Failed to load type for module CalendarModule.
Error was: Could not load file or assembly 'ViewSwitchingNavigation.Calendar.dll' or one of its dependencies. The system cannot find the path specified.
i've got this error at bootstrapper.run()
thanks for any hint!

Resources