You can't install eosio using npm.
If you're looking for an alternative way to install & run a development environment using Docker you can follow the instructions for Docker-compose below. You can also choose a different build option altogether, I've added one below the Docker instructions:
git clone https://github.com/EOSIO/eos.git --recursive --...
I had problems getting EOS to work properly on Ubuntu 18.04. I would recommend downgrading to Ubuntu 16.04 for now if you want to work with something more stable.
However, just to be sure:
Did you do the following commands in the following order?
~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf &
sudo make ...