I have a working nuxt ssr app hosted on firebase functions. I am trying to add firebase analytics to my project. Based on the tutorials, I have added '@nuxtjs/firebase' module on package.json and installed all the dependencies. Now, I added the following code on nuxt.config.js file.
modules: [
'@nuxtjs/firebase',
],
firebase: {
config: {
apiKey: '<apiKey>',
authDomain: '<authDomain>',
databaseURL: '<databaseURL>',
projectId: '<projectId>',
storageBucket: '<storageBucket>',
messagingSenderId: '<messagingSenderId>',
appId: '<appId>',
measurementId: '<measurementId>'
},
services: {
analytics: true
}
}
When I run this code with npm run dev, I get the following error.
WARN Module @nuxtjs/firebase not found. Please ensure @nuxtjs/firebase is in dependencies and installed.
FATAL Cannot find module 'firebase/compat/app'
Require stack:
I couldn't find any answers anywhere.