Thank you for your response.
The error message on Chrome is:
Uncaught SyntaxError: Identifier 'messaging' has already been declared (at pwa-register-sw-1.js?ver=1.7.57:1:1)
My Software Versions are:
WordPress 6.1.1
PWA plugin 1.7.57
I found another solution. I commented out line 3: const messaging = firebase.messaging; and replaced all ‘messaging’ in pwa-register-sw-1.js with ‘firebase.messaging’.
I think the pwa-register-sw-1.js is fine on its own, but another plugin is using the global variable ‘messaging’ as ‘const’ in another .js file, and conflicts with the definition in pwa-register-sw-1.js as the error.