import { createStackNavigator, createAppContainer } from 'react-navigation'; code example
Example: import { createStackNavigator, createAppContainer } from 'react-navigation' error removed
import { createAppContainer } from '@react-navigation/native';
import { createStackNavigator } from 'react-navigation-stack';