We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@nuxtjs/firebase: 8.2.2 firebase: 9.15.0 nuxt: 2.15.8
In the mounted $fire.messaging is undefined.
$fire.messaging
this is my configuration:
modules: [ // https://go.nuxtjs.dev/axios '@nuxtjs/axios', '@nuxtjs/auth-next', [ '@nuxtjs/firebase', { config: { apiKey: "...", authDomain: "...", projectId: "...", storageBucket: "...", messagingSenderId: "...", appId: "...", measurementId: "..." }, services: { messaging: { createServiceWorker: true, fcmPublicVapidKey: '...', inject: fs.readFileSync('./serviceWorker.js') }, } }] ],
and this is the code inside the mounted:
if (process.client) { console.log(this.$fire) }
but it is undefined
The text was updated successfully, but these errors were encountered:
I resolved the issue, after removing server property at the end of nuxt.config.js. FCM didn't work when my project wasn't running on localhost.
...other configs above
// Build Configuration: https://go.nuxtjs.dev/config-build build: { vendor: ['vue-i18n'], }, server: { //remove this server property entirely. host: "0.0.0.0" } }
Sorry, something went wrong.
No branches or pull requests
Version
@nuxtjs/firebase: 8.2.2
firebase: 9.15.0
nuxt: 2.15.8
What is actually happening?
In the mounted
$fire.messaging
is undefined.this is my configuration:
and this is the code inside the mounted:
but it is undefined
![Schermata 2022-12-19 alle 17 24 27](https://user-images.githubusercontent.com/12210564/208478632-82b5637d-acb4-4107-a1a5-646904be6aad.png)
The text was updated successfully, but these errors were encountered: