While trying to fetch the FCM messages in node.js using firebase module, following error \"TypeError: firebase.messaging is not a function\" is occurring.
v
In my case was that I was importing firebase only as
import '@firebase/app'
instead of
import * as firebase from '@firebase/app'
after formatting it, I was able to access messaging from firebase.firebase.messaging()