0
votes

I want to use the Ionicons as this (import {Ionicons} from '@expo/vector-icons';) in my app, but after running it gives the error that (Error: Unable to resolve module @expo/vector-icons from C:\ReactNewProject\App.js: @expo/vector-icons could not be found within the project.) please help.

1
As you have created the project using React Native CLI you can't use expo , but you can use react-native-ionicons .Padmini S
Yes you're correct, but I have tried that and search a lot, it didn't help.Nikola

1 Answers

0
votes

First of all, when you're installing the Expo into your React project, be careful to install the Expo libraries for the exact same Expo version you've installed. Install all the Expo libraries as it says in that version's documentation. For instance for Expo v.4, you can you use the following documentation.

https://reactnavigation.org/docs/4.x/getting-started

And this code (expo install react-navigation react-native-gesture-handler react-native-reanimated react-native-screens) to install all the Expo v.4 libraries, and it will work completely fine.