diff --git a/local-cli/wrong-react-native.js b/local-cli/wrong-react-native.js new file mode 100755 index 000000000..13d4ad35b --- /dev/null +++ b/local-cli/wrong-react-native.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +console.error([ + '\033[31mLooks like you installed react-native globally, maybe you meant react-native-cli?', + 'To fix the issue, run:\033[0m', + 'npm uninstall -g react-native', + 'npm install -g react-native-cli' +].join('\n')); diff --git a/package.json b/package.json index 4e3811dbd..eaf176a38 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "start": "./packager/packager.sh" }, "bin": { + "react-native": "local-cli/wrong-react-native.js", "react-native-start": "packager/packager.sh" }, "dependencies": {