ctubio / tribeca

Self-hosted crypto trading bot (automated high frequency market making) in node.js, angular, typescript and c++
https://127.0.0.1:3000
Other
95 stars 26 forks source link

Recent changes to the `preinstall` script make running on OS X and Docker unworkable. #112

Closed ambethia closed 7 years ago

ambethia commented 7 years ago

I don't know if this was intended, perhaps I should be running inside a docker container anyways, but...

$ npm run install-packages && sudo mkdir -p /data/db/ && sudo chown `id -u` /data/db && npm run compile-quickfix

> tribeca@2.0.0 install-packages /Users/ambethia/Developer/tribeca
> test -n "$(command -v apt-get)" && sudo apt-get -y install g++ build-essential automake libtool libxml2 libxml2-dev zlib1g-dev $(test -n "$(command -v mongo)" || echo mongodb) || (test -n "$(command -v yum)" && sudo yum -y install gcc-c++ automake autoconf libtool libxml2 libxml2-devel zlib-devel $(test -n "$(command -v mongo)" || echo mongodb))

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/Cellar/node/7.9.0/bin/node" "/usr/local/bin/npm" "run" "install-packages"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tribeca@2.0.0 install-packages: `test -n "$(command -v apt-get)" && sudo apt-get -y install g++ build-essential automake libtool libxml2 libxml2-dev zlib1g-dev $(test -n "$(command -v mongo)" || echo mongodb) || (test -n "$(command -v yum)" && sudo yum -y install gcc-c++ automake autoconf libtool libxml2 libxml2-devel zlib-devel $(test -n "$(command -v mongo)" || echo mongodb))`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the tribeca@2.0.0 install-packages script 'test -n "$(command -v apt-get)" && sudo apt-get -y install g++ build-essential automake libtool libxml2 libxml2-dev zlib1g-dev $(test -n "$(command -v mongo)" || echo mongodb) || (test -n "$(command -v yum)" && sudo yum -y install gcc-c++ automake autoconf libtool libxml2 libxml2-devel zlib-devel $(test -n "$(command -v mongo)" || echo mongodb))'.
ambethia commented 7 years ago

I see now README suggests Docker for Mac folks. However, it fails to build on docker at the same point.

FWIW, I was running just fine on mac up until these changes.

> tribeca@2.0.0 install-packages /tribeca
> test -n "$(command -v apt-get)" && sudo apt-get -y install g++ build-essential automake libtool libxml2 libxml2-dev zlib1g-dev $(test -n "$(command -v mongo)" || echo mongodb) || (test -n "$(command -v yum)" && sudo yum -y install gcc-c++ automake autoconf libtool libxml2 libxml2-devel zlib-devel $(test -n "$(command -v mongo)" || echo mongodb))

sh: 1: sudo: not found

npm info lifecycle tribeca@2.0.0~install-packages: Failed to exec install-packages script
ctubio commented 7 years ago

thanks for the notice' I will try to make it work on latest macOS Sierra (Darwin 16.5.0); otherwise will skip this install step to avoid the crash

ambethia commented 7 years ago

I tried messing around with the package.json, adding the homebrew versions of build dependencies, but it had trouble compiling quickfix so I'm putting it off for now.

On Tue, May 30, 2017 at 11:33 PM Carles Tubio notifications@github.com wrote:

thanks for the notice' I will try to make it work on latest macOS Sierra; otherwise will skip this install step to avoid the crash

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ctubio/tribeca/issues/112#issuecomment-305072789, or mute the thread https://github.com/notifications/unsubscribe-auth/AAABKoLLo7njPKXFAkXAwOTsk3Hs7GImks5r_N-hgaJpZM4NrDjx .

-- — Jason L Perry

ctubio commented 7 years ago

meanwhile feel free to remove "preinstall" script from package.json, the quickfix lib is not used yet so it may not further crash

ambethia commented 7 years ago

Probably a different issue, but both on Mac and Ubuntu the build fails:

src/server/gateways/hitbtc.ts(151,5): error TS1128: Declaration or statement expected.

I assume it related to the upstream changes you just pulled in.

ctubio commented 7 years ago

yea sorry i may had write sh*t yesterday night

ctubio commented 7 years ago

since macOS is fixed, ima do like if i didnt listened about Docker failing until someone else opens a new issue (i hate Docker xD), hope is OK for you'¡ (got a long day today so this is my present :D maybe ina weekend i reopen the Docker issue xD)