nuxt-community / laravel-echo-module

Laravel Echo for Nuxt 2
MIT License
86 stars 31 forks source link

Working on localhost, but not on production #29

Closed ste7 closed 3 years ago

ste7 commented 3 years ago

Hello,

Everything is working perfectly fine on local machine, but on remove server $echo is undefined TypeError: Cannot read property 'private' of undefined

nuxt: 2.0.0, laravel-echo: 1.1.0

modules: [
    '@nuxtjs/laravel-echo',
],
echo: {
    broadcaster: 'pusher',
    authModule: true,
    connectOnLogin: true,
    disconnectOnLogout: true,
    authEndpoint: process.env.API_BASE_URL + '/api/broadcasting/auth',
    key: process.env.PUSHER_APP_KEY,
    cluster: process.env.PUSHER_APP_CLUSTER,
    forceTLS: true,
    encrypted: process.env.PUSHER_APP_ENCRYPTED
}
mounted() {
    console.log(this.$echo) // TypeError: Cannot read property 'private' of undefined
}

Dones anyone have idea how to solve this?

Thanks

VinceSanityyy commented 3 years ago

how did you manage to work it on localhost? Because mine is not working even if i send custom events in laravel websockets

ricardogobbosouza commented 3 years ago

Duplicated #41