GithubHelp home page GithubHelp logo

it shows" Upgrade Required" about main HOT 13 CLOSED

hack-chat avatar hack-chat commented on August 17, 2024
it shows" Upgrade Required"

from main.

Comments (13)

marzavec avatar marzavec commented on August 17, 2024

This indicates that you are attempting to navigate your browser towards the websocket port/path. The good news is that this message means the websocket port is accessible.

Now, on your webserver, where did you put the client's index.html? Open the client with your browser.

For instance, this is the difference between visiting:
https://hack.chat/chat-ws hack.chat's websocket port with incorrect uri scheme
vs
https://hack.chat/index.html?marzavec hack.chat's chat client

from main.

marzavec avatar marzavec commented on August 17, 2024

@a7898585 Any updates on this?

from main.

marzavec avatar marzavec commented on August 17, 2024

I'll reopen this if you are still having trouble!

from main.

a7898585 avatar a7898585 commented on August 17, 2024

should i install lnmp first and move the docs under client to /home/wwwroot/default/ ?
and as now, I reinstall the program with script under below, seems can't work anymore
`
1
git clone https://github.com/hack-chat/main.git

2
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -

3
sudo yum -y install nodejs

4
sudo yum install gcc-c++ make

5
cd main/server

6
cp /main/client/* /home/wwwroot/default //default is folder of 80 port

7
npm install pm2@latest -g

8
pm2 start server/main.js --name HackChat

9
visit 127.0.0.1:6060 failed to open it

visit 127.0.0.1 failed to open it`

I‘m new here ,and now so clear with your introduction, thanks for your kind help in advance

from main.

marzavec avatar marzavec commented on August 17, 2024

Before step 8, have you generated or put a config in place? Try:

cd server
npm run config

This force the server to generate a config. After that, you can continue as normal:

pm2 start main.js --name HackChat

If you are still having trouble starting the server software, you can run pm2 logs to see if there are errors starting it.

from main.

GodlyEcstasy avatar GodlyEcstasy commented on August 17, 2024

This happens because you are using 127.0.0.1:6060, do not use the websocket port in the URL. Instead, make it a website with httpd and move the contents of /main/client to /var/www/html. Then you would use this in the url: 127.0.0.1/?nameofchatserver

from main.

a7898585 avatar a7898585 commented on August 17, 2024

when I run the script
cd server
npm run config

it shows
`[root@li261-101 server]# npm run config

[email protected] config /root/main/server
node src/scripts/configure.js

module.js:550
throw err;
^

Error: Cannot find module 'readdir-recursive'
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object. (/root/main/server/src/managers/imports-manager.js:10:14)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] config: node src/scripts/configure.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] config script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-11-06T06_45_16_576Z-debug.log
[root@li261-101 server]# nano /root/.npm/_logs/2018-11-06T06_45_16_576Z-debug.log`

and the debug.log is
0 info it worked if it ends with ok 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'config' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'preconfig', 'config', 'postconfig' ] 5 info lifecycle [email protected]~preconfig: [email protected] 6 info lifecycle [email protected]~config: [email protected] 7 verbose lifecycle [email protected]~config: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~config: PATH: /usr/lib/node_modules/npm/node_mod$ 9 verbose lifecycle [email protected]~config: CWD: /root/main/server 10 silly lifecycle [email protected]~config: Args: [ '-c', 'node src/scripts/configure$ 11 silly lifecycle [email protected]~config: Returned: code: 1 signal: null 12 info lifecycle [email protected]~config: Failed to exec config script 13 verbose stack Error: [email protected] config: node src/scripts/configure.js13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_module$ 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at EventEmitter.emit (events.js:214:7) 13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_module$ 13 verbose stack at emitTwo (events.js:126:13) 13 verbose stack at ChildProcess.emit (events.js:214:7) 13 verbose stack at maybeClose (internal/child_process.js:915:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:$ 14 verbose pkgid [email protected] 15 verbose cwd /root/main/server 16 verbose Linux 4.18.8-x86_64-linode117 17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "config" 18 verbose node v8.12.0 19 verbose npm v6.4.1 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] config:node src/scripts/configure.js22 error Exit status 1 23 error Failed at the [email protected] config script. 23 error This is probably not a problem with npm. There is likely additional logging ou$ 24 verbose exit [ 1, true ]

from main.

a7898585 avatar a7898585 commented on August 17, 2024

here is my server
http://173.255.251.101/?nameofchatserver
installed with nginx and php
nginx html path is /home/wwwroot/default/

from main.

raf924 avatar raf924 commented on August 17, 2024

Did you run npm install at some point ?

from main.

a7898585 avatar a7898585 commented on August 17, 2024

yeah, i do like this
cd main/server
npm install
npm run config
still failed

from main.

a7898585 avatar a7898585 commented on August 17, 2024

I reboot the server and do it again, seems worked
thanks a lot for your kind help.
by the way, if I want to keep the chatting message ,how could I do it?

from main.

marzavec avatar marzavec commented on August 17, 2024

Good to hear!

You want to keep a history of the chat messages and display them when someone joins? A custom module would need to be built to handle this. The difficulty of this would vary depending on how you wanted to store the messages; in memory, or to storage with json or a database.

from main.

a7898585 avatar a7898585 commented on August 17, 2024

sure, i think this chat messages will help some guy who also new in linux
for current soft, it will destroy all the message when all vistors get out of the specified room right?
if I want to store the message into database of txt, is that possible?

from main.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.