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
I was working about 2 days to install this package. I set up my laravel in docker and installed a redis container. Also installed predis on composer.
in nuxt side I run this commands:
npm install socket.io-client npm install --save-dev @nuxtjs/laravel-echo
npm install socket.io-client
npm install --save-dev @nuxtjs/laravel-echo
my files looks like this
nuxt.config.js buildModules: [ // https://go.nuxtjs.dev/vuetify '@nuxtjs/vuetify', ['@nuxtjs/laravel-echo', { broadcaster: 'socket.io', host: 'backend.localhost', transports: ['websocket', 'polling'], }] ],
buildModules: [ // https://go.nuxtjs.dev/vuetify '@nuxtjs/vuetify', ['@nuxtjs/laravel-echo', { broadcaster: 'socket.io', host: 'backend.localhost', transports: ['websocket', 'polling'], }] ],
in any vue component this.$echo.channel('aChannel') .listen("TestEvent", (e) => { console.log(e); });
this.$echo.channel('aChannel') .listen("TestEvent", (e) => { console.log(e); });
When I inspect on chrome console, ws is connect to server. But when i fire an event on laravel, nuxt side was not listening.
Also when I inspect socket properties, connect property was false.
However, when I changed socket.io-client version to 2.4.0 it worked...
"socket.io-client": "2.4.0"
I dont know why but may you fix this problem.
The text was updated successfully, but these errors were encountered:
use .on(...) interface instead of .listen(...)
.on(...)
.listen(...)
Sorry, something went wrong.
as far as i remember i tried it too but it didn't work. If I try again, I'll write the result here.
I'm experiencing the same issue. Laravel with socket.io
Issue solved on #9
No branches or pull requests
I was working about 2 days to install this package.
I set up my laravel in docker and installed a redis container. Also installed predis on composer.
in nuxt side I run this commands:
npm install socket.io-client
npm install --save-dev @nuxtjs/laravel-echo
my files looks like this
nuxt.config.js
buildModules: [ // https://go.nuxtjs.dev/vuetify '@nuxtjs/vuetify', ['@nuxtjs/laravel-echo', { broadcaster: 'socket.io', host: 'backend.localhost', transports: ['websocket', 'polling'], }] ],
in any vue component
this.$echo.channel('aChannel') .listen("TestEvent", (e) => { console.log(e); });
When I inspect on chrome console, ws is connect to server. But when i fire an event on laravel, nuxt side was not listening.
Also when I inspect socket properties, connect property was false.
However, when I changed socket.io-client version to 2.4.0 it worked...
"socket.io-client": "2.4.0"
I dont know why but may you fix this problem.
The text was updated successfully, but these errors were encountered: