请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

接口报错 - 500 - Detected outdated Service Worker

控制台错误信息如下:
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

正在回答 回答被采纳积分+3

1回答

提问者 qq_小江南_04298178 2021-07-08 09:11:46

已解决

主要参考另一个同学的问题 :

[services worker不能正常运行](https://coding.imooc.com/learn/questiondetail/vQW1lYEpv03PyE9A.html)


我的操作是重装依赖后执行 命令:

 npx msw init ./public


1 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信