After init a React Native project, if i install and import any other dependency, it will show this error message after run "react-native run-ios":
For e.g: I run "react-native init RNProject" to create simple react native project. After that i install react-navigation by :"npm install --save-dev react-navigation" then i import createStackNavigator by "import { createStackNavigator } from 'react-navigation';" in App.js and do nothing. After run "react-native run-ios" and got that error above. Remove the "import { createStackNavigator } from 'react-navigation';" will cause the app run normally.
I tried "rm node_modules/react-native/local-cli/core/fixtures/files/package.json" or "rm ./node_modules/react-native/local-cli/core/fixtures/files/package.json" but the terminal show "No such file or directory".
My Environment
| software | version
| ---------------- | -------
| react-navigation | 2.6.2
| react-native | 0.56.0
| node | 8.11.3
| npm | 5.3.0
| MacOS | 10.13.5
npm install
and check – NightFury