Elessar
Elessar

Reputation: 93

What is the problem with 'react-native-elements'?

When I try to use 'react-native-elements' package in my code, I face this error :

bundling failed: Error: Unable to resolve module react-native-vector-icons/FontAwesome from node_modules\react-native-elements\src\social\SocialIcon.js: react-native-vector-icons/FontAwesome could not be found within the project.

I have done many things to fix it. I installed the 'react-native-vector-icons' again, I used 'rm ./node_modules/react-native/local-cli/core/fixtures/files/package.json' but non of them worked. what should I do to overcome this problem? I really appreciate your help guys.

Upvotes: 1

Views: 7239

Answers (2)

Çağlar Durmuş
Çağlar Durmuş

Reputation: 106

if you are using react version <0.60 use react-native link react-native-vector-icons and do the steps link and if react version > 0.60 then cd ios && pod install && cd .. and try again if its not work delete the build folder and rebuild again.

Upvotes: 0

Mr.vdtarsariya
Mr.vdtarsariya

Reputation: 159

make sure that you've installed the package with npm install react-native-vector-icons and link it through

react-native link react-native-vector-icons

then for ios you need to install pod (goto your project ios folder on terminal and enter command pod install)

and then reset packager cache with react-native start --reset-cache

Upvotes: 7

Related Questions