3
votes

Using :

  • react-native-cli: 2.0.1
  • react-native: 0.57.1
  • native-base: ^2.9.2

What I have done :

1 : expo-cli init test

When prompted, I chose to create a blank project.

2 : cd test

3 : npm install --save native-base

4 : npm install --save @expo/vector-icons

Then I import and use native-base Text component in App.js

Here is the error I get when building the app :

Unable to resolve "@expo/vector-icons/FontAwesome5" from "node_modules/native-base/dist/src/basic/IconNB.js"

Any suggestion or is it a known issue ? Am I doing it wrong ?

5
I'm also facing this problem exactly right now.ßiansor Å. Ålmerol

5 Answers

7
votes

Eureka !

I downgraded native base to version to 2.8.2 and it works.

npm install --save [email protected]

Found it here : https://github.com/oblador/react-native-vector-icons/issues/857

1
votes

Use react-native link native-base it will start working on your side, no need to downgrade.

it will work

1
votes

one more step ! type react-native link in cmd

1
votes
0
votes

Downgrade the version often there are problem for new release of components. Choose stable one first and then increment it gradually during project