I\'m using create-react-app with an express server.
create-react-app
has a pre-configured ServiceWorker that caches local assets (https://github.com/fac
I think that the service worker file is not present at http://localhost:3000/service-worker.js
so the server is returning index.html instead. Then the registration function has no idea of what to do with a index.html file and tells you that the MIME-type is not correct.
A quick fix would be to copy the service-worker.js file to the public
folder so that when you hit http://localhost:3000/service-worker.js
you see the file in the browser.
Remember to go to ChromeDev > Applications > ServiceWorkers and hit Unsubscribe. in order to remove the errored one. Remember also disable cache