Haehnchen / crypto-trading-bot

Cryptocurrency trading bot in javascript for Bitfinex, Bitmex, Binance, Bybit ... (public edition)
MIT License
3.07k stars 974 forks source link

SyntaxError: Unexpected token ? Exit status 1 #304

Open XxTashToshxX opened 2 years ago

XxTashToshxX commented 2 years ago

Tried to install and run the code in multiple machines and docker, been getting this error in all of them, any ideas?

crypto-trading-bot | crypto-trading-bot | > crypto-trading-bot@0.0.0 start /usr/src/app crypto-trading-bot | > node index.js trade crypto-trading-bot | crypto-trading-bot | /usr/src/app/node_modules/winston-telegram/lib/winston-telegram.js:46 crypto-trading-bot | this.handleExceptions = options.handleExceptions ?? true crypto-trading-bot | ^crypto-trading-bot | crypto-trading-bot | SyntaxError: Unexpected token ? crypto-trading-bot | at Module._compile (internal/modules/cjs/loader.js:723:23) crypto-trading-bot | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) crypto-trading-bot | at Module.load (internal/modules/cjs/loader.js:653:32) crypto-trading-bot | at tryModuleLoad (internal/modules/cjs/loader.js:593:12) crypto-trading-bot | at Function.Module._load (internal/modules/cjs/loader.js:585:3) crypto-trading-bot | at Module.require (internal/modules/cjs/loader.js:692:17) crypto-trading-bot | at require (internal/modules/cjs/helpers.js:25:18) crypto-trading-bot | at Object. (/usr/src/app/src/modules/services.js:46:31) crypto-trading-bot | at Module._compile (internal/modules/cjs/loader.js:778:30) crypto-trading-bot | at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) crypto-trading-bot | npm ERR! code ELIFECYCLE crypto-trading-bot | npm ERR! errno 1 crypto-trading-bot | npm ERR! crypto-trading-bot@0.0.0 start: node index.js trade crypto-trading-bot | npm ERR! Exit status 1 crypto-trading-bot | npm ERR! crypto-trading-bot | npm ERR! Failed at the crypto-trading-bot@0.0.0 start script. crypto-trading-bot | npm ERR! This is probably not a problem with npm. There is likely additional logging output above. crypto-trading-bot | crypto-trading-bot | npm ERR! A complete log of this run can be found in: crypto-trading-bot | npm ERR! /root/.npm/_logs/2022-06-02T20_20_14_831Z-debug.log crypto-trading-bot exited with code 1

cinderspire commented 2 years ago

i took similar error fixed by change back name

federicomidaglia commented 1 year ago

same here

DominiqueGEORGES commented 1 year ago

same also (on a Mac Book Pro M1 Max)

Where do we change "back name". I'm a Python developer, know nothing about npm, ...

AFAlexandrov commented 1 year ago

Change ?? to || in the following line crypto-trading-bot | this.handleExceptions = options.handleExceptions ?? true

file: /usr/src/app/node_modules/winston-telegram/lib/winston-telegram.js:46