Login to Prefect Cloud fails with an error "Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.”

The error is from a bad service worker and to remove the problem we advise unregistering service workers. To do that, you can:

  1. Open the dev console
  2. Go to Application
  3. Select Storage
  4. Make sure ‘Unregister service workers’ is selected
  5. Click ‘Clear site data’ and then refresh the screen (possibly hard refresh with cmd + Shift + R).

Here is a video to help with that: