I just created a React Native project and it crashes immediately when I type react-native run-android
The error code:
"undefined is not a function (evaluating 'reactDevTools.connectToDevTools')"
Here is my package.json
{
"name": "MoveObject",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"react": "16.6.3",
"react-native": "0.57.8"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
}
}
If you know how to solve this issue, please let me know.
I tried to solve it by these ways but fail:
1/ npm install
2/ npm install after remove node_modules
3/ I also tried other versions of React Native: 0.57.7 and 0.57.4 but still have the same error.