mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 11:34:23 +00:00
Warn when installing globally react-native instead of react-native-cli
This adds a react-native binary that just output some instructions.
This commit is contained in:
parent
436682fbad
commit
0a5967dbfe
7
local-cli/wrong-react-native.js
Executable file
7
local-cli/wrong-react-native.js
Executable file
@ -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'));
|
@ -39,6 +39,7 @@
|
|||||||
"start": "./packager/packager.sh"
|
"start": "./packager/packager.sh"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
|
"react-native": "local-cli/wrong-react-native.js",
|
||||||
"react-native-start": "packager/packager.sh"
|
"react-native-start": "packager/packager.sh"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user