React-native-vector-icons: Metro from RN 0.60.0 warns that rnpm config is deprecated and will stop working in the next release

Created on 3 Jul 2019  路  10Comments  路  Source: oblador/react-native-vector-icons

This shows up when running the Metro Bundler from React Native v0.60.0:

warn The following packages use deprecated "rnpm" config that will stop working from next release:
  - react-native-vector-icons: https://github.com/oblador/react-native-vector-icons

See https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide

Most helpful comment

This worked for me on a upgraded project and on a brand new RN 0.60.0

Remove the rnpm line from package.json

For IOS add this to ios/projectname/Info.plist

    <key>UIAppFonts</key>
    <array>
        <string>AntDesign.ttf</string>
        <string>Entypo.ttf</string>
        <string>EvilIcons.ttf</string>
        <string>Feather.ttf</string>
        <string>FontAwesome.ttf</string>
        <string>FontAwesome5_Brands.ttf</string>
        <string>FontAwesome5_Regular.ttf</string>
        <string>FontAwesome5_Solid.ttf</string>
        <string>Foundation.ttf</string>
        <string>Ionicons.ttf</string>
        <string>MaterialCommunityIcons.ttf</string>
        <string>MaterialIcons.ttf</string>
        <string>Octicons.ttf</string>
        <string>SimpleLineIcons.ttf</string>
        <string>Zocial.ttf</string>
    </array>

For Android add this line to android/app/build.gradle

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

All 10 comments

Same here.. any idea ?

Same problem to me

This worked for me on a upgraded project and on a brand new RN 0.60.0

Remove the rnpm line from package.json

For IOS add this to ios/projectname/Info.plist

    <key>UIAppFonts</key>
    <array>
        <string>AntDesign.ttf</string>
        <string>Entypo.ttf</string>
        <string>EvilIcons.ttf</string>
        <string>Feather.ttf</string>
        <string>FontAwesome.ttf</string>
        <string>FontAwesome5_Brands.ttf</string>
        <string>FontAwesome5_Regular.ttf</string>
        <string>FontAwesome5_Solid.ttf</string>
        <string>Foundation.ttf</string>
        <string>Ionicons.ttf</string>
        <string>MaterialCommunityIcons.ttf</string>
        <string>MaterialIcons.ttf</string>
        <string>Octicons.ttf</string>
        <string>SimpleLineIcons.ttf</string>
        <string>Zocial.ttf</string>
    </array>

For Android add this line to android/app/build.gradle

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

same here, any new release?

Hello community!

I just solved this problem in RN 0.60 for the moment in Android, there are a series of steps that should be followed, the annex.

Update the dependency to the last update so far:

  • In the package.are copy this "react-native-vector-icons": "^ 6.6.0"
  • run "npm install --save react-native-vector-icons"

It is important the "--save" in this new version of react-native since for some reason when running the "npx jetify" command it finds it that way

-If they do not have the jetify install it is necessary, "npm i jetifier"

  • Clean the caches to make sure, run "cd android && ./gradlew clean"
  • If gradlew throws them an error, it's because they do not have permissions "chmod 755 gradlew"
  • Copy the following code to the end of the file, "android/app/ build.gradle"

project.ext.vectoricons = [
iconFontNames: [
'FontAwesome.ttf',
'FontAwesome5.ttf'
] // Name of the font files you want to copy
]

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

  • open a terminal and run "react-native start", for some reason this new version does not automatically open the node server.
  • run "react-native run-android"

I hope it serves you.
Greetings.

@dannydanzka fix did it for me, thanks!

@dannydanzka That works for me thanks...but for IOS still "Unrecognized font family 'FontAwesome'".

Thanks @immortalx it's working for me.

thank you @dannydanzka, it works for me

@dannydanzka Thanks for this solution! Did you find any solution for IOS?

Was this page helpful?
0 / 5 - 0 ratings