Closed telogit closed 4 years ago
This project caught my attention a few days ago too. It looks like a great solution to some of the social distancing blues we're now facing around the world. I'd be happy to see some of my fixes get merged back into the project but in the meantime ny fork is here. Make sure you look at simpleserver_setup_notes.txt
I've put my changes into a branch named simpleserver. I've been able to get it to run on Node 10 and I've adapted it to run with local storage (i.e. without AWS ) so that you can set up a server for you and your friends easily. The instructions to set up a server ( or locally to test) are found in simpleserver_setup_notes.txt.
Heroku changed something in the configs, i need to see what the problem is. Does your fix work for Heroku ?
Hey there, yeah, exactly, because of the social distancing thing I was looking around, how to enable social interaction. Playing games while skype or using the integrated chat seems to be fun. I merged your latest changes, JJones780. Did you get the software running? Nice to see some progress. Thanks to both of you @fyyyyy here is the heroku log:
-----> Node.js app detected
-----> Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NODE_ENV=production
NODE_MODULES_CACHE=true
NODE_VERBOSE=false
-----> Installing binaries engines.node (package.json): 0.11.13 engines.npm (package.json): unspecified (use default)
Resolving node version 0.11.13...
Downloading and installing node 0.11.13...
Using default npm version: 1.4.9
-----> Installing dependencies Installing node modules (package.json)
> storage-engine@3.0.7 postinstall /tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/diagnostics/node_modules/storage-engine
> node ./compatibility/detect.js
/tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/diagnostics/node_modules/storage-engine/lib/compatibility/detect.js:3
const path = require('path');
^^^^^
SyntaxError: Use of const in strict mode.
at exports.runInThisContext (vm.js:69:16)
at Module._compile (module.js:432:25)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Module.require (module.js:357:17)
at require (module.js:373:17)
at /tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/diagnostics/node_modules/storage-engine/compatibility/detect.js:26:27
at Object.<anonymous> (/tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/diagnostics/node_modules/storage-engine/compatibility/detect.js:41:2)
at Module._compile (module.js:449:26)
npm ERR! Error: ENOENT, lstat '/tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/diagnostics/node_modules/colorspace/node_modules/color/package.json'
npm ERR! at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.4.0-1062-aws
npm ERR! command "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/bin/node" "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/bin/npm" "install" "--production=false" "--unsafe-perm" "--userconfig" "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.npmrc"
npm ERR! cwd /tmp/build_744ba998563c5b7a5f8d560396dc7543
npm ERR! node -v v0.11.13
npm ERR! npm -v 1.4.9
npm ERR! path /tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/diagnostics/node_modules/colorspace/node_modules/color/package.json
npm ERR! fstream_path /tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/diagnostics/node_modules/colorspace/node_modules/color/package.json
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! fstream_stack /tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:97:15)
npm ERR! Error: ENOENT, open '/tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/setheader/node_modules/diagnostics/node_modules/kuler/node_modules/colornames/index.js'
npm ERR! at Error (native)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.4.0-1062-aws
npm ERR! command "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/bin/node" "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/bin/npm" "install" "--production=false" "--unsafe-perm" "--userconfig" "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.npmrc"
npm ERR! cwd /tmp/build_744ba998563c5b7a5f8d560396dc7543
npm ERR! node -v v0.11.13
npm ERR! npm -v 1.4.9
npm ERR! path /tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/eureca.io/node_modules/primus/node_modules/setheader/node_modules/diagnostics/node_modules/kuler/node_modules/colornames/index.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! storage-engine@3.0.7 postinstall: `node ./compatibility/detect.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the storage-engine@3.0.7 postinstall script.
npm ERR! This is most likely a problem with the storage-engine package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./compatibility/detect.js
npm ERR! You can get their info via:
npm ERR! npm owner ls storage-engine
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.4.0-1062-aws
npm ERR! command "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/bin/node" "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/bin/npm" "install" "--production=false" "--unsafe-perm" "--userconfig" "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.npmrc"
npm ERR! cwd /tmp/build_744ba998563c5b7a5f8d560396dc7543
npm ERR! node -v v0.11.13
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
> kerberos@0.0.24 install /tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)
make: Entering directory '/tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos/build'
CXX(target) Release/obj.target/kerberos/lib/kerberos.o
In file included from /app/.node-gyp/0.11.13/deps/v8/include/v8stdint.h:36:0,
from /app/.node-gyp/0.11.13/deps/v8/include/v8.h:41,
from /app/.node-gyp/0.11.13/src/node.h:61,
from ../lib/kerberos.h:4,
from ../lib/kerberos.cc:1:
/app/.node-gyp/0.11.13/deps/v8/include/v8config.h:358:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /app/.node-gyp/0.11.13/deps/v8/include/v8.h:41:0,
from /app/.node-gyp/0.11.13/src/node.h:61,
from ../lib/kerberos.h:4,
from ../lib/kerberos.cc:1:
/app/.node-gyp/0.11.13/deps/v8/include/v8stdint.h:38:19: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
#if V8_OS_WIN && !V8_CC_MINGW
^~~~~~~~~~~
/app/.node-gyp/0.11.13/deps/v8/include/v8stdint.h:38:19: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
In file included from ../lib/kerberos.h:9:0,
from ../lib/kerberos.cc:1:
../node_modules/nan/nan.h: In function ‘void Nan::SetCounterFunction(v8::CounterLookupCallback)’:
../node_modules/nan/nan.h:569:32: error: ‘class v8::Isolate’ has no member named ‘SetCounterFunction’
v8::Isolate::GetCurrent()->SetCounterFunction(cb);
^~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h: In function ‘void Nan::SetCreateHistogramFunction(v8::CreateHistogramCallback)’:
../node_modules/nan/nan.h:574:32: error: ‘class v8::Isolate’ has no member named ‘SetCreateHistogramFunction’
v8::Isolate::GetCurrent()->SetCreateHistogramFunction(cb);
^~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h: In function ‘void Nan::SetAddHistogramSampleFunction(v8::AddHistogramSampleCallback)’:
../node_modules/nan/nan.h:579:32: error: ‘class v8::Isolate’ has no member named ‘SetAddHistogramSampleFunction’
v8::Isolate::GetCurrent()->SetAddHistogramSampleFunction(cb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h: In function ‘bool Nan::IdleNotification(int)’:
../node_modules/nan/nan.h:590:39: error: ‘class v8::Isolate’ has no member named ‘IdleNotification’
return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
^~~~~~~~~~~~~~~~
../node_modules/nan/nan.h: In function ‘void Nan::LowMemoryNotification()’:
../node_modules/nan/nan.h:595:32: error: ‘class v8::Isolate’ has no member named ‘LowMemoryNotification’
v8::Isolate::GetCurrent()->LowMemoryNotification();
^~~~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h: In function ‘void Nan::ContextDisposedNotification()’:
../node_modules/nan/nan.h:599:32: error: ‘class v8::Isolate’ has no member named ‘ContextDisposedNotification’
v8::Isolate::GetCurrent()->ContextDisposedNotification();
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/kerberos.cc: In static member function ‘static void Kerberos::After(uv_work_t*)’:
../lib/kerberos.cc:948:50: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
worker->callback->Call(ARRAY_SIZE(info), info);
^
In file included from ../lib/kerberos.h:9:0,
from ../lib/kerberos.cc:1:
../node_modules/nan/nan.h:1618:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
../lib/kerberos.cc:972:50: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(int, v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
worker->callback->Call(ARRAY_SIZE(info), info);
^
In file included from ../lib/kerberos.h:9:0,
from ../lib/kerberos.cc:1:
../node_modules/nan/nan.h:1618:3: note: declared here
Call(int argc, v8::Local<v8::Value> argv[]) const {
^~~~
kerberos.target.mk:90: recipe for target 'Release/obj.target/kerberos/lib/kerberos.o' failed
make: *** [Release/obj.target/kerberos/lib/kerberos.o] Error 1
make: Leaving directory '/tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1046:12)
gyp ERR! System Linux 4.4.0-1062-aws
gyp ERR! command "node" "/tmp/build_744ba998563c5b7a5f8d560396dc7543/.heroku/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /tmp/build_744ba998563c5b7a5f8d560396dc7543/node_modules/connect-mongo/node_modules/mongodb/node_modules/kerberos
gyp ERR! node -v v0.11.13
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /tmp/build_744ba998563c5b7a5f8d560396dc7543/npm-debug.log
npm ERR! not ok code 0
-----> Build failed
We're sorry this build is failing! You can troubleshoot common issues here:
https://devcenter.heroku.com/articles/troubleshooting-node-deploys
Some possible problems:
- This version of npm (1.4.9) has several known issues - consider upgrading to the latest release (6.14.4)
https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version
Love,
Heroku
! Push rejected, failed to compile Node.js app. ! Push failed
I've got some more changes to contribute soon. Currently stuck on getting the video conferencing going :( I'm focusing on a small server config and have never looked into heroku.
Hey there, ok, nice. I am not very familiar with heroku either, I just thought it might be easier to setup, since I have no linux root server.
EDIT: I followed your guide and was able to get tabloro running. Thanks for your help so far. Awesome
Did you get it running on heroku ? What did you change ? Will try to push it again, the domain is still active.
Ah sorry, no, just as JJones780 did in ubuntu server 16.04...
I've uploaded my most recent changes.. accidentally left in a hack that overlaps cards in-hand by 2/3 so change that back if you wish (see src/game/Hand.js:46). If anyone checks out these changes over an existing install you would need to: 'cd tabloro && npm install peer'
Seems to be fully working except for the video conferencing. Recently noticed that you can spin pieces by dragging from rotate icon.
As far as the Heroku install... I've only tried installing on older node ( v10.19 and v9.10 as I mentioned in simpleserver_setup_notes.txt. There are plenty of warnings about deprecated features so I've stayed away from newer versions of anything for the time being... the goal was to see it running and decide from there.
I wish I'd seen this earlier... would be very handy for digitizing an entire deck of cards automatically? http://www.fmwconcepts.com/imagemagick/multicrop2/index.php
Hi there, thanks for getting it running JJones780! I did not try heroku any further.
On my own machine I managed to create my first game. I did not test it with friends tough.
As a feature request here is one thought:
manually sorting your hand cards would be really nice - now they are just sorted with their index number from the spreatsheet, the higher the number, the more to the right they are.
as soon as you touch a card from your hand cards, it will be moved on the table. Imagine you have 5 cards and you click on the third card. The card moves out of your hand on the table. Your hand cards fill the gap of the moved card and are displayed on top of the one on the table. So the player itself can not see the card anymore.
Hi, I also just stumbled on tabloro in search for good platform for remote gaming under current circumstances. I managed to run it on heroku (or so it seems) and created a pull request. Please check if it's ok. https://github.com/fyyyyy/tabloro/pull/9
Thanks, pushing now to tabloro.com exciting, havent touched this in many years
I got a very nasty error, while adding my third game:
box: 5e821828a980ef71a5f3bd8c, user: 5e81d903a952930934b6b914, __v: 0 } UUUSetup { MongoError: E11000 duplicate key error collection: tabloro.tables index: users_1 dup key: { : undefined } at Function.create (/home/server/tabloro/node_modules/mongoose/node_modules/mongodb/lib/core/error.js:44:12) at toError (/home/server/tabloro/node_modules/mongoose/node_modules/mongodb/lib/utils.js:150:22) at coll.s.topology.insert (/home/server/tabloro/node_modules/mongoose/node_modules/mongodb/lib/operations/common_functions.js:266:39) at /home/server/tabloro/node_modules/mongoose/node_modules/mongodb/lib/core/connection/pool.js:408:18 at process._tickCallback (internal/process/next_tick.js:61:11) driver: true, name: 'MongoError', index: 0, code: 11000, errmsg: 'E11000 duplicate key error collection: tabloro.tables index: users_1 dup key: { : undefined }', [Symbol(mongoErrorContextSymbol)]: {} }
Use node 11, not 13
tabloro.com is online again. Thanks for the help 🎉 🎉 🎉 Let me know any issues!
Hey there, I wanted to check out tabloro.com but it is offline. I tried to deploy the git repository to heroku but it failed.
Maybe you are keen to check it out. Thank you!