问题描述
我正在尝试将FCM与next.js集成。但是它显示以下错误。有人可以帮我处理next.config.js文件吗?
FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('http://localhost:3000/firebase-cloud-messaging-push-scope') with script ('http://localhost:3000/firebase-messaging-sw.js'): A bad HTTP response code (404) was received when fetching the script. (messaging/failed-service-worker-registration).
at WindowController.eval (webpack-internal:///./node_modules/@firebase/messaging/dist/index.esm.js:1053:45)
at step (webpack-internal:///./node_modules/tslib/tslib.es6.js:124:23)
at Object.eval [as throw] (webpack-internal:///./node_modules/tslib/tslib.es6.js:105:53)
at rejected (webpack-internal:///./node_modules/tslib/tslib.es6.js:96:65)
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)