接口报错 - 500 - Detected outdated Service Worker
来源:7-1 给页面添加Loading和Error状态,增加页面友好性

qq_小江南_04298178
2021-07-07
控制台错误信息如下:
index.js:1 [MSW] Detected outdated Service Worker: Currently active Service Worker (dc3d39c97ba52ee7fff0d667f7bc098c) is behind the latest published one (65d33ca82955e1c5928aed19d1bdf3f9).
The mocking is still enabled, but it’s highly recommended that you update your Service Worker by running:
$ npx msw init <PUBLIC_DIR>
This is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.
If this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues
console. @ index.js:1
online:3000/me?:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
localhost/:1 Uncaught (in promise) Object
auth-provider.ts:20 POST http://online:3000/login 500 (Internal Server Error)
接口错误信息如下
请求 URL: http://online:3000/login
请求方法: POST
状态代码: 500 Internal Server Error (自service worker)
引用站点策略: strict-origin-when-cross-origin
1回答
-
qq_小江南_04298178
提问者
2021-07-08
已解决
主要参考另一个同学的问题 :[services worker不能正常运行](https://coding.imooc.com/learn/questiondetail/vQW1lYEpv03PyE9A.html)
我的操作是重装依赖后执行 命令:npx msw init ./public
10
相似问题