Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed prop type: Invalid prop name of value home-outline supplied to `Icon #1215

Open
withPleasure opened this issue Jul 27, 2020 · 10 comments

Comments

@withPleasure
Copy link

withPleasure commented Jul 27, 2020

For android, I try to use 'home-outline' icon of ionicons

import Icon from 'react-native-vector-icons/Ionicons';
<Icon name='home-outline' size={30}/>;

but i have error
Failed prop type: Invalid prop 'name' of value 'home-outline' supplied to 'Icon...

I have lastest version of this package "react-native-vector-icons": "^7.0.0",
And for React-native "react-native": "~0.62.2",
I read documentation but i don't see why i have this warning :(

@withPleasure withPleasure changed the title Failed prop type: Invalid prop name of value calendar-month supplied to `Icon Failed prop type: Invalid prop name of value home-outline supplied to `Icon Jul 27, 2020
@JacksonLaw
Copy link

JacksonLaw commented Aug 4, 2020

I am getting the same issue. The Ionicons v5 icons are not recognised despite being in the glyph map.

EDIT: Think I found the issue - the glyph map numbers start again when it reaches the ios ones. So "add": 61696, is the first line and line 1229 is "ios-add": 61696, , then line 2456 is"md-add": 61696,
Ionicons v5 removes all ios and md icons, replacing them with outline, filled, sharp. The font file packaged in this version reflects that but the glyph map doesn't.

In saying this, I haven't been able to get it working myself, someone who knows what they're doing might have to create the PR

@kalleriakronos24
Copy link

i'm getting the same issue, still looking for the fix T_T

@arstropica
Copy link
Contributor

arstropica commented Aug 10, 2020

Use md-{icon name} for android or ios-{icon name} for ios. Not 100% sure why this is happening but it looks like some installs have difficulty with the latest version of Ionicons.

@Royhan18
Copy link

I have the same problem. Still looking for the fix

@hamzafarooqui98
Copy link

Use any other vector icon library's heart Icon like AntDesign as I used this:

import AntDesign from 'react-native-vector-icons/AntDesign';

@satyabrata-dash5
Copy link

Same issue happens with me

@donchuru
Copy link

donchuru commented Jan 2, 2023

I'm having the same issue even with AntDesign icons. Anyone find a fix?

@sgshy1995
Copy link

I'm having the same issue even with AntDesign icons too. Anyone find a fix?

@TARANjee
Copy link

It is problem came from android gradle so .

Android
Option: With Gradle (recommended)
This method has the advantage of fonts being copied from this module at build time so that the fonts and JS are always in sync, making upgrades painless.

Edit android/app/build.gradle ( NOT android/build.gradle ) and add the following:

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

Or

if did't got so can check this documentation
https://www.npmjs.com/package/react-native-vector-icons

@mohsenfl2022
Copy link

I have realized that after the update, the names of some icons have changed. For instance,
name='ios-chatbubbles-outline'
is not found in the path
import Ionicons from 'react-native-vector-icons/Ionicons';
and this causes an error. Remove 'ios-' from the name and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests