Comments (8)
I'm not entirely sure if Node 6 is a "requirement".
That is all I've tested with so far. If you can test with a lower version please let me know. Thanks
from laravel-echo-server.
Hi,
So I updated to version 0.9.65 that you released a few hours ago.
Then I downgraded to Node 5.12.0 because of the errors using Gulp etc and that sorted those issues out with Laravel-Elixir etc.
However when I restarted my server.js i kept getting this:
node server.js
/home/vagrant/Code/new.mydomain.com/node_modules/laravel-echo-server/dist/echo-server.js:159
emitPresenceEvents(socket, channel, members, member, action = null) {
^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/vagrant/Code/new.mydomain.com/node_modules/laravel-echo-server/dist/index.js:2:23)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
So I thought maybe it was because I was using your new release. SO I downgraded that to 0.9.5 (which was working yesterday).
No joy, kept getting this message:
node server.js
/home/vagrant/Code/new.mydomain.com/node_modules/laravel-echo-server/dist/echo-server.js:122
emitPresenceEvents(socket, channel, members, member, action = null) {
^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/home/vagrant/Code/new.mydomain.com/node_modules/laravel-echo-server/dist/index.js:2:23)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
Finally upgraded back to Node 6, and it started working again.
node server.js
EchoServer: "Servering at http://new.<mydomain>.dev:6001"
So it appears that node 6 is required.
Would you be able to see/understand why it is needed? Would it be a massive or difficult task to make this package Node 5 compatible too?
Thank you kindly as I have very very much out of my depth with the javascript package world.
from laravel-echo-server.
Changing between node versions, I used the info I got from here.
http://stackoverflow.com/a/34974626
from laravel-echo-server.
So it looks like because you are using default parameter values which is a new feature in JS and so only works in Node v6?
I think there is a simple work around to this: http://www.codereadability.com/javascript-default-parameters-with-or-operator/ (Paragraph starting with: How to set defaults values instead)
I have just edited the echo-server.js
file and I appear to have it working on Node 5+
Standby
from laravel-echo-server.
Ah yes, that is probably why. I'll make that update when I get a chance.
from laravel-echo-server.
You'll know much better than me, but here's what I did to make it work.
from laravel-echo-server.
Closing and fixing in an upcoming release.
from laravel-echo-server.
Thanks very much.
I think node 5 is what is installed as default on homestead and whilst it isn't difficult to upgrade node, it might help stop a lot of support issues if it was compatible with the version that comes as default.
Also I think node 4.xx is the LTS version at the moment too. I haven't done any testing with that, but if your lucky you might be able to support that version too!!
from laravel-echo-server.
Related Issues (20)
- Is the package compromised? HOT 6
- Laravel-echo-server events listeners custom callbacks
- Redis6 ACL Support HOT 1
- 运行一会,就会中断,提示截图显示的错误 HOT 2
- Cannot find module '../dist/cli' - supervisord
- Redis 6 ACL config HOT 1
- Connection refused on docker
- Laravel Echo Server work and client side error only at server HOT 2
- Is there ways to emit data from client (socket.io-client) to laravel-echo-server? HOT 2
- Laravel Echo PresenceChannel vs listen events doesn't work HOT 2
- 使用Laravel 5.8 广播系统,本地研发没有事情,上线后握手阶段,第一次OK,第二次报502,第三次报session id unknown,现在不知道是那个地方出问题了?求帮助 HOT 1
- Is `tlaverdure/laravel-echo-server` abandoned? HOT 6
- Is the cors configuration even working? HOT 1
- echo server socket.io.js error
- support redis cluster
- Redis TTL key is store forever
- CSRF token mismatch after session timeout
- npx laravel-echo-server start HOT 1
- Unable to join channel. Member data for presence channel missing HOT 1
- Is this project compatible with Socket.io v4? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-echo-server.