To fix this error, simply reinstall project & node modules using npm
npm install
Then it will show a list of warnings, and to fix them use the following command:
npm audit fix
This should fix everything, and allow you to run iOS emulator
react-native run-ios