Native-base not working with react-native 0.57.1?

Viewed 6704

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 Answers

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

it will work

one more step ! type react-native link in cmd

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

Related