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
Here's what worked for me from start to finish.
react-native init NavTest
(The cli is locally installed with this command)npm install --save react-navigation
npm install
react-native run android
A little ugly, I don't know entirely what happened, but this worked.
https://reactnavigation.org/ for sample code to run.Or Copy this to index.android.js
import React, { Component } from 'react';
import {
AppRegistry,
Button,
} from 'react-native';
import {
StackNavigator,
} from 'react-navigation';
class HomeScreen extends Component {
static navigationOptions = {
title: 'Welcome',
};
render() {
const { navigate } = this.props.navigation;
return (