Skip to content
New issue

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

Setup broadcaster with socket.io #66

Closed
BEY9S opened this issue Nov 17, 2016 · 9 comments
Closed

Setup broadcaster with socket.io #66

BEY9S opened this issue Nov 17, 2016 · 9 comments

Comments

@BEY9S
Copy link

BEY9S commented Nov 17, 2016

Hi,
I followed the basic configuration of WebSocket given within the docs (driver: Redis, socket.io), but each times i run gulp, I got the error below :

{ [Error: ./~/laravel-echo/dist/echo.js
Module not found: Error: Can't resolve 'pusher-js' in '/my/projet/node_modules/laravel-echo/dist'

Hope someone can help me to figure out this problem, knwoing that i didn't do any setup with pusher-js.

@happyDemon
Copy link

pusher is a hard dependency for some reason. doing a simple npm install pusher should do the trick

@mealinks
Copy link

I don't use pusher dependency, because i set up my Echo with socket. But thanks I figured out by creating a webpack.config.js where i skipped pusher-js.

@happyDemon
Copy link

ah that was the other option indeed 👍

@BEY9S
Copy link
Author

BEY9S commented Nov 18, 2016

It does @happyDemon , i did add also pusher-js and webpack passed.

can you tell me if i need to run laravel-echo-server each times i'd like to communicate my socket, also do i need socketIO configuration stuff in the client.

@happyDemon
Copy link

This should do it:
new Echo({ broadcaster: 'socket.io', host: 'URL', })

You do have to keep the node server running to listen to/send events.
in a live environment you could do that with Supervisor or PM2

@martingg88
Copy link

@mealinks can i have an example for how you skip the pusher-js? many thanks

@BEY9S
Copy link
Author

BEY9S commented Mar 10, 2017

Hey @martingg88

here is a relative issue #52

@driesvints
Copy link
Member

Closing this issue because it's already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue.

@WhyIExist
Copy link

can someone help, I have this same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants