Closed alinz closed 9 years ago
I added icons from this package to a project that uses React Native 0.6.0. It didn't cause any issues.
Have you tried to use the Icon or TabBar components? I don't see any problems by include the files. It starts showing errors as soon as I use Icon component.
Weird, I started seeing this error when upgrading from 0.6 to 0.7-rc2 and to react-native master. I had to make some changes to the code in order to get react-native-icons to work.
Can you try if my branch https://github.com/mnylen/react-native-icons/tree/0.7-support works for you? Just replace the version of react-native-icons
with mnylen/react-native-icons#0.7-support
in package.json and npm will download my branch. Remember to restart the packager after this change.
Also, instead of doing require('FAKIconImage')
or require('SMXTabBarIOS')
in your code do var {FAKIconImage, SMXTabBarIOS} = require('react-native-icons')
instead.
Also, if that doesn't help, could you try modifying node_modules/react-native-icons/iOS/ReactNativeIcons/IconTabBarItem/SMXTabBarManager.m. Just add line
@synthesize methodQueue = _methodQueue;
between @synthesize bridge = _bridge;
and RCT_EXPORT_MODULE()
lines. After this, you must recompile the project. (Cmd+R in Xcode)
@mnylen, thanks adding @synthesize methodQueue = _methodQueue;
did solve the problem. Thank you.
@corymsmith would you please take a look at this? I will keep this ticket open until some sort of solution get into the code.
Same here. Doesn't work with current react-native/master, even with https://github.com/mnylen/react-native-icons/tree/0.7-support and the all hacks. Packager unable to resolve modules.
if you see those wringings start by Packager unable to resolve modules...
, it means that all the 3rd party libraries need to be changed of how they importing core modules.
@unknownexception Weird, it's working for me with the latest version from react-native master & my 0.7-support branch. I still see the occasional error about the methodQueue though (should probably add that also). Here's the project https://github.com/mnylen/react-native-bing-news
If you mean the "Unable to resolve module __ from _____" messages in packager output, those are to be expected with several libraries & 0.7.. Like alinz said above, it's not really an error - it's just a warning that library developers / users should stop requiring NativeModules, StyleSheet, View etc. directly and instead use the exports on react-native.
This should be fixed now, just accepted a PR from @brentvatne with support for RN 0.7+
Hello, After upgrading to 0.6.0, I'm getting these errors.
any idea?