-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
react-native link never works #15646
Comments
link issue were solved in 0.47.1. |
I had this issue after renaming a project. The old name was still used in one place and because of this linking was silently failing. |
I'm also having the exact same issue with react-native |
Complete step to reproduce: $ react-native -v
react-native-cli: 2.0.1
react-native: 0.47.2
$ create-react-native-app foo
$ cd foo
foo$ yarn add react-native-device-info
foo$ react-native link react-native-device-info
foo$ cat <<EOF > App.js
> import React from 'react';
> import { StyleSheet, Text, View } from 'react-native';
>
> var DeviceInfo = require('react-native-device-info');
>
> export default (props) => {
> return (
> <View
> style={{
> flex: 1,
> backgroundColor: '#fff',
> alignItems: 'center',
> justifyContent: 'center'
> }}
> >
> <Text>Locale: {DeviceInfo.getDeviceLocale()}</Text>
> </View>
> );
>};
>EOF Now if I eject and link manually in XCode, it works.
|
Same problem with any other library, for instance |
The problem is that |
There is already an error message by now in master: https://github.com/facebook/react-native/blob/master/local-cli/link/link.js#L160 |
Thanks, that's what I did, everything works correctly :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
YES
Environment
react-native -v
: react-native-cli: 2.0.1, react-native: 0.47.0node -v
: v8.4.0npm -v
: 5.3.0yarn --version
: 0.27.5Then, specify:
iOS and Android
macOS and Linux
Not specific to any platform
Steps to Reproduce
(Write your steps here:)
npm install <lib_name> --save
react-native link <lib_name>
Expected Behavior
The linking of the library must happen.
Actual Behavior
The library linking never happens and I will have to manually do all the steps to add the library in both iOS and Android.
Reproducible Demo
I think this step is not applicable as it is related to linking.
The text was updated successfully, but these errors were encountered: