-
Notifications
You must be signed in to change notification settings - Fork 142
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
Requiring internal react-native modules will stop working #59
Comments
It seems that the 0.7's updated packager also completely changes how requires should be done.
I started some of this work at https://github.com/mnylen/react-native-icons/tree/0.7-support . Hopefully it helps a bit. |
Yes, good catch. We actually never intended that our non-standard internal module system leak out into the community. It works ok for the company but won't work in the wild; mainly because it's single global namespace. Going forward we want to use node modules standard. |
Why is this closed? AFAICT, this is still a problem in the code: FAKIconImage.ios.js:
Am I missing something? |
@jeffreywescott Some of them were fixed and I had closed it incorrectly. Will re-open now. Some of the modules aren't exposed so will have to sort out what to do with those. If you have any thoughts or want to do a PR let me know. |
See: #71. It's not perfect, but at least things are running in my project on react-native 0.8.0. |
react-native uses a module format that is specific to Facebook that relies on a global namespace. We're trying to isolate it from the outside world and use the standard CommonJS and node modules instead. Therefore in the latest react-native version 0.7.0-rc.2 requiring any of the internal modules using their name will be warning and in the future will be an error.
For example
require('NativeModules')
is now a warning:To depend on NativeModules please use the exported react-native node module:
This issue was originally reported here: facebook/react-native#1808
The text was updated successfully, but these errors were encountered: