octachrome / treason

A clone of the card game Coup written in Node.js
Other
139 stars 79 forks source link

Update lib usage #32

Closed js802025 closed 4 years ago

js802025 commented 4 years ago

When I try to compile on windows I get this:

npm : npm WARN deprecated webdriverio@4.14.4: outdated version, please use @next
At line:1 char:1
+ npm install
+ ~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (npm WARN deprec...lease use @next:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

npm

WARN

deprecated
 request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm

WARN

deprecated
 jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm

WARN

deprecated
 mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API 
surface has changed to use Promises in 1.x.)
npm

WARN

deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm

WARN

deprecated
 mkdirp@0.5.3: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API 
surface has changed to use Promises in 1.x.)
npm

WARN

deprecated
 minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm

WARN

deprecated
 core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. 
Please, upgrade your dependencies to the actual version of core-js@3.
npm

WARN

deprecated
 json3@3.3.2: Please use the native JSON object instead of JSON 3
npm
 ERR!

code
 ENOENT
npm ERR! syscall spawn git
npm

ERR!

path
 git
npm

ERR!

errno
 ENOENT
npm
 ERR! enoent Error while executing:
npm ERR! 
enoent undefined ls-remote -h -t ssh://git@github.com/winstonjs/winston.git
npm ERR! enoent 
npm ERR! enoent 
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 
npm

ERR!
 A complete log of this run can be found in:
npm

ERR!
     C:\Users\adeej\AppData\Roaming\npm-cache\_logs\2020-03-18T17_34_37_777Z-debug.log
octachrome commented 4 years ago

Looks like you need to install git. The other messages are just warnings.

js802025 commented 4 years ago

I think you are right, while I have you when I go to your hosted version every so often it calls a 502 web err. So I was wondering how to host it myself or wanted to at least make you aware of this error. Thanks for any suggestions.

octachrome commented 4 years ago

Yeah the server often runs out of memory because it's cheap. It's not trivial to host, but others have done so. I suggest looking through the closed issues on GitHub, where others have asked about this and some suggestions can be found.

js802025 commented 4 years ago

downloaded couch but got this: name: 'CouchError', message: 'unauthorized: You are not a server admin.', error: 'unauthorized', reason: 'You are not a server admin.', headers: { 'cache-control': 'must-revalidate', 'content-length': '64', 'content-type': 'application/json', date: 'Wed, 18 Mar 2020 22:06:49 GMT', server: 'CouchDB/3.0.0 (Erlang OTP/22)', 'x-couch-request-id': '9691f113d4', 'x-couchdb-body-time': '0', status: 401 } }

js802025 commented 4 years ago

Can you tell me what the database password should be?

chrisb-fico commented 4 years ago

Treason does not use a database username or password. In the version of Couch I am using (2.x), there is no username or password by default. It looks like Couch 3.x may have introduced a default username and password (admin/password). I suggest you configure Couch to disable this. (Check the docs to find out how). Alternatively, you could edit dataaccess-couch.js and pass the username/password into the cradle.Connection() call. (Check the Cradle docs to find out the syntax.)

Klaffen commented 4 years ago

Example of username and password dataaccess-couch.js var connection = new (cradle.Connection)('http://127.0.0.1', 5984, { auth: { username: 'admin', password: 'admin' } });

js802025 commented 4 years ago

P.S. have u tried hosting with Heroku?

chrisb-fico commented 4 years ago

@js802025 I think Heroku would cost 2-3x the price of my VPS

dnathe4th commented 4 years ago

If you're just looking to host a game yourself you can also just chop out the couchdb logic. I did that because I'm tossing it on my heroku to play with my friends and don't need a leaderboard. Somewhat orthogonal from the original ticket here though.

octachrome commented 4 years ago

I have actually just committed a similar change, on the live branch, to disable couch because it causes too many problems with the server running out of ram.

dnathe4th commented 4 years ago

Lol I literally just made a new branch called dn-optional-couchdb to do this. Will take a look at that branch. Thoughts on merging it to master?

Anyways, in the original spirit of the title of this issue I put up #34

octachrome commented 4 years ago

@dnathe4th This is now merged into master, couchdb is no longer needed.