Sort:  

Hi again. Im trying to set this up and i have followed all the instructions. I copied your full code and edited it. Set up the bot on discord. But when i go to turn it on with pm2 start voter.js it says the command is not found. I have restarted the whole process and still getting the same error that pm2 is not a command.

you must install all requirments
check again this article.
you must install pm2 before starting it.
npm install pm2

i tried this. however i am getting an error when trying to install npm install steem --save. But either way npm install pm2 does not fix that there is no pm2 command. Should i wipe the server and try to start over?

I used this bot on 4 ubuntu system. and all of them works fine.

I am doing this on a VPS i got from AWS for free. I will try to set it up on a VM on my main machine. Also thank you for your replys. To mention i did get one error when following your steps. The database part "CREATE DATABASE database voter;" i removed the database part to get it to work.

Oh, I used 2 'database'. Thanks.
I think you missed something. try this codes and then install requirments.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

I tried on a vm and get the same exact thing. It says when i install pm2 that 'npm WARN optional Skipping failed optional dependency /chokidar/fsevents:'
'npm WARN Not compatible with your operating system or architecture : [email protected]'
also that there is no file or directory package.json
i don't know if this is my problem or not. I followed your directions to a Tee. Can you please help me.