baraber
baraber

Reputation: 3356

Native-base not working with react-native 0.57.1?

Using :

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 ?

Upvotes: 3

Views: 7751

Answers (5)

Yossi
Yossi

Reputation: 6027

Solved (kind of) in @expo/vector-icons v8.1.0.

See https://github.com/expo/vector-icons/issues/58#issuecomment-450015936

Upvotes: 1

baraber
baraber

Reputation: 3356

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

Upvotes: 9

Mehdi Meshkatian
Mehdi Meshkatian

Reputation: 308

one more step ! type react-native link in cmd

Upvotes: 1

Love Behl
Love Behl

Reputation: 26

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

it will work

Upvotes: 1

Ankit Tale
Ankit Tale

Reputation: 2004

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

Upvotes: 0

Related Questions