Sort:  

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.