Closed Icezman001 closed 3 years ago
Here is my console output on my windows device:
Perhaps the 80 port is providing difficulty? I did notice on stackoverflow they mention you need admin privileges to use any port under 1024. As you can see on the second try I changed the port to 8080 and then it does do something but I get another error for invalid URL (node:4064) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: ws://:0 (see below)
`PS H:\Github\TEST\rustplusplus-main> npm start
rustplusplus@1.0.0 start H:\Github\TEST\rustplusplus-main node server.js
events.js:292 throw er; // Unhandled 'error' event ^
Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (net.js:1296:21)
at listenInCluster (net.js:1361:12)
at Server.listen (net.js:1447:7)
at Function.listen (H:\Github\TEST\rustplusplus-main\node_modules\express\lib\application.js:618:24)
at Object.node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the rustplusplus@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\USERNAME\AppData\Roaming\npm-cache_logs\2020-11-17T10_42_18_751Z-debug.log PS H:\Github\TEST\rustplusplus-main> npm start
rustplusplus@1.0.0 start H:\Github\TEST\rustplusplus-main node server.js listening for requests on port 80, (node:4064) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: ws://:0 at onParseError (internal/url.js:256:9) at new URL (internal/url.js:332:5) at initAsClient (H:\Github\TEST\rustplusplus-main\node_modules\ws\lib\websocket.js:502:17) at new WebSocket (H:\Github\TEST\rustplusplus-main\node_modules\ws\lib\websocket.js:71:7) at H:\Github\TEST\rustplusplus-main\node_modules\rustplus-api\rustplus.js:56:30 (node:4064) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:4064) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. Terminate batch job (Y/N)? ^C ^C PS H:\Github\TEST\rustplusplus-main> npm startrustplusplus@1.0.0 start H:\Github\TEST\rustplusplus-main node server.js
listening for requests on port8080,
(node:15144) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_URL]: Invalid URL: ws://:0
at onParseError (internal/url.js:256:9)
at new URL (internal/url.js:332:5)
at initAsClient (H:\Github\TEST\rustplusplus-main\node_modules\ws\lib\websocket.js:502:17)
at new WebSocket (H:\Github\TEST\rustplusplus-main\node_modules\ws\lib\websocket.js:71:7)
at H:\Github\TEST\rustplusplus-main\node_modules\rustplus-api\rustplus.js:56:30
(node:15144) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15144) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Terminate batch job (Y/N)?
^C
PS H:\Github\TEST\rustplusplus-main> `
Hi Icezman,
Could you please try running 'sudo npm start' instead. I've had weird issues with GPIO access and non root priv.
In regards to dotenv lib, that was previously used in testing, I will remove the dependency next release!
After you have started the server with sudo please navigate to the server settings and enter in your server details, there is a better explanation of this in the README file.
I've sent you a message on Discord as well, if anything comes to light I will also post a comment here. For anyone else reading this my Discord is padoru padoru padoru#0137
For anyone else interested, this was an issue with the actual game server not having Rust+ configured. Please ask the server admin to configure Rust+ if you are having issues with a particular server.
Thanks so much for this. Exactly what I was searching for!
I'm trying to get it to work but I noticed it uses the dotenv npm module. Are there any specific config files we need to create with variables as it doesn't seem to be included in the source folder
Would it be possible to add me on discord so we can walk through this? Add me @nerif-tafu Icezman#9468
Right now the server works but it stays on current server: IP ADDRESS (Disconnected)