An error occurred while retrieving token.
FirebaseError: Messaging: We are unable to register the default service worker. SyntaxError: Unexpected token '{'. import call expects exactly one argument. (messaging/failed-service-worker-registration).
f —_app-6e5ce7543176b121599c.js:1:8509
create — _app-6e5ce7543176b121599c.js:1:8994
(anonymous function) —_app-6e5ce7543176b121599c.js:1:639312
asyncFunctionResume
(anonymous function)
promiseReactionJobWithoutPromise.
promiseReactionJob
I am getting fcm token from localhost. But the problem occurred when I try to build my next project and start or after deploying to the server. I tried several solution from various sources.