React project, error: ReferenceError: Cache is not defined

React project starts, console error message: ReferenceError: Cache is not defined

the environmental background of the problems and what methods you have tried

related codes

A big project. I can"t paste the code. I don"t know where it went wrong. It doesn"t feel like it"s the fault of the logical code, it"s that the relevant dependencies are not found.

what result do you expect? What is the error message actually seen?

can solve this problem, I am in a hurry


A colleague inadvertently introduced sw-toolbox, and was able to access it normally after removing it

/ / import {router} from 'sw-toolbox';


I've had similar problems. Did you quote the networkFirst option in Google's sw-toolbox? Delete it.
refer to https://www.miaomiaomiao.org/.


what is your operating environment?

The reason for the

error should be that you used the serviceWorker, service worker dependent window.Cache object.

your operating environment has not been reported wrong. So what is your operating environment? Can I try a normal browser?

reference: https://stackoverflow.com/que.


my running environment is Google, and my editing environment is: Visual Studio Code

Menu