Reputation: 137
import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import HomeScreen from './HomeScreen';
const Stack = createNativeStackNavigator();
function App() {
return(
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name = "Home" component={HomeScreen}/>
</Stack.Navigator>
</NavigationContainer>
)
}
export default App;
Unable to resolve module @react-native-masked-view/masked-view from D:\React Native\SDR-Project\node_modules@react-navigation\elements\src\MaskedViewNative.tsx: @react-native-masked-view/masked-view could not be found within the project.
If you are sure the module exists, try these steps:
8 | typeof import('@react-native-masked-view/masked-view').default; | ^ 9 | 10 | type Props = React.ComponentProps & { 11 | children: React.ReactElement;
Upvotes: 1
Views: 5334
Reputation: 6424
Please Install this dependency.
@react-native-community/masked-view
if it doesn;t work then install @react-native-masked-view/masked-view
Read more on install react-navigation into your project here are a list of some dependencies that you must install in order to run the application
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
Upvotes: 2