score:17

Accepted answer

This is something related to babel-preset-react-native modules. Try to run,

yarn remove babel-preset-react-native
yarn add babel-preset-react-native@2.1.0

Or if you use NPM,

npm uninstall babel-preset-react-native
npm install babel-preset-react-native@2.1.0

score:0

Delete node_modules folder,then run command.

 npm install

Then run the project.

score:0

Try to kill any process on port 8081

if you are on MAC then run below command

sudo lsof -n -i4TCP:8081

score:3

Answered to this in the topic: https://stackoverflow.com/a/45778766/4621698

This worked for me.

Workaround:

"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.47.1",
"babel-preset-react-native": "2.1.0"
},

See above, now babel-preset-react-native points to 2.1.0. Then,

rm -rf node_module
npm cache clean
npm i

And restart whichever android or ios.


Related Query

More Query from same tag