hack.chat
hack.chat copied to clipboard
JS Popup for Username not Working!
Hello I'm able to install it on my Localhost to test this code. it worked and when i change my url to new group or channel i got no popup for Adding Name and Nothing else working, can't message etc Javascripts not working.
Odd. Is anything showing up in the web console? (Ctrl-Shift-K)
Everything Else Working fine! Just didn't saw Popup for username! Because of that Messages isn't showing up as well!
http://i.imgur.com/0xgYt09.png
It's either not connecting to the websocket server, or localstorage is causing a problem. In either case, a stack should be printed to the web console. So nothing is there?
Starting up http-server, serving ./ Available on: http:127.0.0.1:8080 http:192.168.1.50:8080 Hit CTRL-C to stop the server [Tue, 13 Oct 2015 11:17:34 GMT] "GET /?banana" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36"
Oh, sorry, I mean the Web Console in the browser. In Firefox and Chrome, this can be launched with Ctrl-Shift-K. Give the page a refresh and at the minimum a warning from KaTeX should be printed in the console.
This : WebSocket connection to 'ws://localhost:6060/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
you need to start the chat server AND the webserver looks like you only started the web (http-server) to me. Try node server.js
in the hack.chat source root directory
Thank you for helping me out man! It worked! Just waiting for more update like Register Username :) Else it's really nice code, simple the better, fast and perfect.
Now this after installing on centos vps 3gb ram
[email protected] start /root/hack.chat node server.js
/root/hack.chat/server.js:87 for (var client of server.clients) { ^^ SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:906:3
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is most likely a problem with the hack.chat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls hack.chat
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-042stab093.4
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! cwd /root/hack.chat
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /root/hack.chat/npm-debug.log
npm ERR! not ok code 0
update ur node installation, i bet you dont have an ES6 compatible engine yet so it says for of
is invalid
mine says "
for (var client of server.clients) { ^^ SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3 " How do i fix this?
update your node installation (on debian based distros: apt-get update && apt-get upgrade --only-upgrade nodejs
)
now it is :
for (var client of server.clients) { ^^ ("^^" is under "of") SyntaxError: Unexpected identifier at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3
still the same answer: u need to update your node installation
@M4GNV5 Is right. Run node --version
. If the version is less than 0.12, which is the Debian/Ubuntu default, Node will not support Ecmascript 6 features like "for of". You could upgrading using his method, or use the up-to-date binaries on the Node.js website (https://nodejs.org/)
I got the same issue though it works outside of work network though the regular hack.chat site works just fine. Any ideas?
How to keep the client and server running?
I use Forever, but you can use whatever you want.