Summary:
IIRC we made `wrong-react-native` to warn people in case they installed `react-native` globally (instead of `react-native-cli` what the guide suggests). To do that we added `bin` entry to React Native's `package.json` that points to `local-cli/wrong-react-native.js`
However, this means that if we have a project that uses `react-native` package and has call to `react-native` CLI inside its package.json, npm will execute *local* override (which just prints a confusing in this context error message).
In fact, the template we generate with `react-native init` has `react-native start` as `start` script, which makes it useless. Let's fix it by making `wrong-react-native` script smarter – it can detect that it has been executed from local `node_modules` and run the actual CLI.
cc vjeux ide
Closes https://github.com/facebook/react-native/pull/7243
Differential Revision: D3226645
Pulled By: frantic
fb-gh-sync-id: be094eb0e70e491da4ebefc2abf11cff56c4c5b7
fbshipit-source-id: be094eb0e70e491da4ebefc2abf11cff56c4c5b7
Summary:
When used in automation, `wrong-react-native` can cause problems because it does not
report the issue via exit code.
Closes https://github.com/facebook/react-native/pull/5114
Reviewed By: svcscm
Differential Revision: D2799995
Pulled By: frantic
fb-gh-sync-id: 23c32dac9b0fcdbeaf48b94e9cb220c6c1b344aa
Summary: public
This was introduced by vjeux on 0a5967d and removed on 0686b01. I guess it was removed accidentally as this this is a nice warning to have that should prevent n00bs from commiting a common mistake
Reviewed By: frantic
Differential Revision: D2563885
fb-gh-sync-id: 9fae145bbec587514f118d1d28d076b1d82f0630