React-native-vector-icons: Unable to Build app due to compilation errors

Created on 12 Jun 2017  路  19Comments  路  Source: oblador/react-native-vector-icons

I am receiving the following error while building the react-native app:

/node_modules/react-native-vector-icons/RNVectorIconsManager/RNVectorIconsManager.m:95:37: error: too many arguments to block call, expected 1, have 3
        reject(@"font_load_failed", @"Font failed to load", error);
        ~~~~~~                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated

Note: I installed Vector-Icons using Cocoapods.

 pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

Most helpful comment

I fixed by removing pod from Podfile and added font to xcode project as described in manually install option.

All 19 comments

@oblador Seems like this is coming from here:

nalyzing dependencies
Fetching podspec for `RNVectorIcons` from `../node_modules/react-native-vector-icons`
Downloading dependencies
Using RNVectorIcons (4.2.0)
Using React (0.11.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.

[!] React has been deprecated

Hi did you figure out the problem. I have the same

Hey, you need to also install ReactNative with cocoapods if you integrate RNVI with it otherwise you'd be stuck with a duplicate and old version of RN :-)

Closing due to inactivity.

@oblador I have the same problem. I've created the RN project with "react-native init " command but I've added the react-native-vector-icons using pods option. React native version is 0.48.3. What should I do?

@AdrianZghibarta and @Midnight-Coder, I have the same problem. Have you solved the problem?

@AdrianZghibarta @Midnight-Coder @oblador I have the same problem. How did you solve it?

@kostyaVyrodov @BerndWessels I've made the native iOS link without Pods, instead I've used the "drag and drop from node_modules to Library folder" method

The same with you guys!
use 'react-native init xx' to create project, and pod install .

I fixed by removing pod from Podfile and added font to xcode project as described in manually install option.

Having the same problem here

Same with me. Facing problem to build React App due to Semantic Error. Installed the package using Cocoapods and manually, never able to build it

The same issue :(

I just made a hack-solution

change this

reject(@"font_load_failed", @"Font failed to load", error);

to

reject(error);

@Karbaz
I did do and resolved.
However, Is it correct way?

@shinriyo

No Its not the right way.

I used to get error like as mention below.
reject accept 1 argument but got 3
so this way i just pass 1 argument in reject function

This is just an hack for my solutions
But its not the actual solutions for this error

  • run react-native link react-native-vector-icons
  • check podfile delete pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
    or some pod auto insert there
  • pod install
  • clear and build project
Was this page helpful?
0 / 5 - 0 ratings

Related issues

fevzican picture fevzican  路  3Comments

reactor123 picture reactor123  路  3Comments

obykoo picture obykoo  路  3Comments

lossen picture lossen  路  4Comments

emretekince picture emretekince  路  4Comments