mundus
mundus

Reputation: 115

Error when installing react navigation packages in react native Android

Im currently doing a course in udemy about react-native and one of the contents requires me to install react-native-screens and react-native-safe-area-context. However when installing "npm install @react-navigation/stack" and run the app (metro) i get this error :

enter image description here

Is there any fix? thanks

Upvotes: 0

Views: 243

Answers (1)

Sonal Maniya
Sonal Maniya

Reputation: 134

You can follow react-navigation documentation(react navigation). Also, ensure that you have installed the required libraries.

yarn add @react-navigation/native react-native-screens react-native-safe-area-context

If you have npm use this:

npm install -save @react-navigation/native react-native-screens react-native-safe-area-context

Install above libraries and then install stack navigation.

yarn add @react-navigation/stack

for npm:

npm install --save @react-navigation/stack

Upvotes: 1

Related Questions