Recently I started getting this issue, when I install a react-native package
(eg: react-navigation
) into my project, a whole bunch of packages are been removed (including react, react-native i think).
And then when i try to run command "run-android
", it says it doesn't recognize.
I recently updated to the latest npm
and react-native-cli
. Is it something wrong with "npm install
"? or react-native
?
node version: 8.1.2 <br/>
react-native-cli: 2.0.1 <br/>
react-native: 0.45.1 <br/>
react-navigation: 1.0.0-beta.11
Below are the steps to re-create:
Notice in the image above. Seems like all the other packages are removed from the project.<br/><br/>
Any idea on what the issue is and any way to solve it?
Found the solution here.
At first running npm install
didn't work, but then, deleting the package-lock.json
file and running npm install
did the job.
After that I installed react-navigation
package seperately and it worked fine.