How to install the React-Navegation library at the prompt?

Asked

Viewed 152 times

-1

I’m studying React Native and already have Visual Studio Code installed, in the video class taught the command

npx react-navigation

but when I use the command the prompt give me the error message

npm ERR! 404 '[email protected]' is not in the npm registry

  • 1

    you are using Yarn or npm to manage your packages, which I know we do not use npx, good at least in my studies of javascript and react never use

  • My project was created by the NPX command, application is running on emulator, in the video it was said that could be used NPX or NPM, I believe it is a typo command, but I do not understand very well the difference between these two managers.

  • npx when creating the application (which takes the latest version) is one thing, but managing the packages is either Yarn or npm, so install by npm ...

  • 1

    There’s something strange in the code you sent. Code snippet is: React-navigation but the error message is like React-Navegation. Noticed the difference?

  • In your code must be React-Navandgation when the correct is React-Navigation.

  • @Virgilionovic the manager is npm. Augusto o 'E' instead of 'i' was my mistake when typing here in the question, but in the command I typed right, but I still could not. am using the command >npm install React-navigation< and did not work to install React navigation.

  • The error must be in the program when it imports the lib.

Show 2 more comments

1 answer

0

It depends on which operating system you are using.

In windows via npm: Step 1: npm install @React-navigation/Native Step 2: npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view

If using EXPO install install this step 2

Step 2: expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view

Browser other questions tagged

You are not signed in. Login or sign up in order to post.