You may need to install/update nodejs.
Ubuntu reference: https://github.com/nodesource/distributions/blob/master/README.md
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs
You may need to install/update yarn.
Ubuntu reference: https://yarnpkg.com/en/docs/install#debian-stable
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install --no-install-recommends yarn
yarn install
Or
yarn add commander
yarn add eosjs
yarn add moment
2. [Optional] Add getTableByScope to eosjs-api
If your chain.json does not have getTableByScope, add getTableByScope to node_modules/eosjs-api/lib/api/v1/chain.json.
Refer to meet-one's fork of eosjs-api.
wget https://raw.githubusercontent.com/meet-one/eosjs-api/master/src/api/v1/chain.json -O node_modules/eosjs-api/lib/api/v1/chain.json
node 1-export-accounts.js -m
node 2-get-accounts-info.js -m mainnet-1-all-accounts.txt
node 3-create-accounts.js mainnet-2-info.txt
node 3-calc-total-staked-eos.js mainnet-2-info.txt
node 3-create-sidechain-accounts.js mainnet-2-info.txt
node 4-export-meetone-accounts.js -m
node 5-get-meetone-balancei.js -m mainnet-4-meetone-accounts.txt
node 6-sort-balance.js mainnet-5-meetone-balance.txt