When creating a new react native project using the standard react-native init MyApp
and running react-native run-ios
for the first time I\'m seeing
I have face same problem because of incorrect arrangement of createStackNavigator
, createAppContainer
, createSwitchNavigator
in react-native routes
You should add and install babel for your projects
npm add @babel/runtime
npm install
If The error is not fixed, Try:
npm start --reset-cache
Current error message suggests these steps to fix this:
The last one solved it for me.
Have a go and try:
npm add @babel/runtime
Or upgrade babel runtime:
"@babel/runtime": "7.0.0-beta.55"
You should first quit the metro terminal before executing
npm add @babel/runtime
npm install
Try to update your npm version first
npm update -g npm@version
or sudo npm -gf update npm@version
and then just add the babel runtime at your react native project
npm add @babel/runtime