-
Notifications
You must be signed in to change notification settings - Fork 1.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
Adds sanity check for presence of react-native
conflict
#934
Conversation
@@ -30,12 +30,27 @@ var rnCli = enforceGlobalDependency({ | |||
optional: false, | |||
range: '>=2.0.0', | |||
which: 'react-native', | |||
package: 'react-native-cli', | |||
packageName: 'react-native-cli', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed this was missed from my previous #929 PR.
versionCommand: 'react-native --version', | ||
installMessage: 'To install: npm i -g react-native-cli' | ||
}) | ||
|
||
if (!rnCli) { | ||
// If `react-native` is installed, it can cause problems with `react-native-cli` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I only run this if the react-native-cli
check fails. That's because this check is much slower and if we ran it every time ignite
ran, we'd add several seconds to the bootup.
Since we are targetting es3, @jamonholmgren we will have to remove the multilines in that console.log. Unless you can test that in node 4. If its good, we can add an linter ignore directive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm cool with this as is. A future improvement would be nice to find a different way to detect that global react-native
package that isnt slow. Just not sure how.
Some folks can have it installed AND a valid react-native-cli
.
Fixes #940 too |
Ref #874.