zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Unexpected token *

Open arthurwolf opened this issue 2 years ago • 4 comments


Remove everything above before creating your issue.

System information

  • Have I written custom code (as opposed to using zenbot vanilla): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04, Fresh install in VM
  • Zenbot version (commit ref, or version): What github clones this day
  • Zenbot branch: Same
  • NodeJS version: 8.17.0 (what the instructions in the docs installed)
  • Python version (when using a python script): 2.7.12
  • Exact command to reproduce (include everything): ./zenbot.sh backfill kraken.AAVE-EUR --days 1
  • Did I make any changes to conf-sample.js?: no

Describe the problem

Describe the problem clearly here. Be sure to convey here why it's a bug in Zenbot or a feature request.

Trying to run

./zenbot.sh backfill kraken.AAVE-EUR --days 1

Gives me

arthur@zenbot:~/zenbot$ ./zenbot.sh backfill kraken.AAVE-EUR --days 1 /home/arthur/zenbot/node_modules/kraken-api/node_modules/got/dist/source/create.js:157 const paginateEach = (async function* (url, options) { ^

SyntaxError: Unexpected token * at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:617:28) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/home/arthur/zenbot/node_modules/kraken-api/node_modules/got/dist/source/index.js:14:18)

Source code / Error logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.

arthurwolf avatar Nov 12 '21 10:11 arthurwolf

The instructions say "Node.js (version 8.3.0 or higher)" perhaps try a more recent version like NodeJS 16

DeviaVir avatar Nov 12 '21 16:11 DeviaVir

I'll try that thanks!

Just to be clear though, the instructions ( https://github.com/DeviaVir/zenbot/tree/unstable/docs ) say (in «Ubuntu 16.04 Step-By-Step» ) to run:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -

Which I did, and which installed this version. Did I miss something, or is this a potential issue with the instructions?

If this is an issue with the instructions being out of date, would you be interested in somebody trying to get this running on the latest Ubuntu LTS, and making a PR for the changes once they are shown to work?

arthurwolf avatar Nov 12 '21 16:11 arthurwolf

Always! Those docs are all user-contributed, so keeping them up to date by users makes a lot of sense.

DeviaVir avatar Nov 12 '21 16:11 DeviaVir

Testing on latest Ubuntu LTS (20.04), the following works (from a 100% fresh install):

sudo apt-get update sudo apt-get upgrade -y sudo apt-get install build-essential mongodb nodejs npm -y git clone https://github.com/deviavir/zenbot.git cd zenbot npm install ./zenbot.sh trade --paper

Which is even more straightforward than the current 16.04 instructions. Want a PR with those instructions added to the current 16.04 ones? Replacing them?

( Also do you know of anyone who has in the past contributed to the project, and who would be ready to do work-for-hire/freelancing work improving zenbot? The work would be contributed to the project through PRs. )

arthurwolf avatar Nov 18 '21 13:11 arthurwolf