Hi,
please make sure you've followed all the steps in this guide:
https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2
I recommend you to use the "integration" branch before running "npm run setup":
git checkout integration
npm run setup
The integration branch has our latest code, so all the fixes for libraries and Cordova are in there. It'll be moved to the master branch eventually.
Cheers,
Dani