kazim ali
kazim ali

Reputation: 137

Masked View Error in React Native Why it is happening again and again i need solution coders

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:

  1. Clear watchman watches: watchman watch-del-all
  2. Delete node_modules and run yarn install
  3. Reset Metro's cache: yarn start --reset-cache
  4. Remove the cache: rm -rf /tmp/metro-* 6 | 7 | type MaskedViewType =

8 | typeof import('@react-native-masked-view/masked-view').default; | ^ 9 | 10 | type Props = React.ComponentProps & { 11 | children: React.ReactElement;

enter image description here

Upvotes: 1

Views: 5334

Answers (1)

Engr.Aftab Ufaq
Engr.Aftab Ufaq

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

Related Questions