Skip to content

Commit 45ade50

Browse files
authored
Merge pull request #198 from react-native-community/feat/remove-global-check
feat: remove hacky check for faulty global react-native installation
2 parents 9cbe1fb + 7213bb8 commit 45ade50

File tree

4 files changed

+3
-46
lines changed

4 files changed

+3
-46
lines changed

packages/cli/src/bin.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,9 @@
66
* This source code is licensed under the MIT license found in the
77
* LICENSE file in the root directory of this source tree.
88
*
9-
* @format
9+
* @flow
1010
*/
1111

12-
import chalk from 'chalk';
13-
import isInstalledGlobally from './util/isInstalledGlobally';
14-
import logger from './util/logger';
1512
import cliEntry from '.';
1613

17-
if (isInstalledGlobally()) {
18-
logger.error(
19-
[
20-
'Looks like you installed react-native globally, maybe you meant react-native-cli? ',
21-
'To fix the issue, run: ',
22-
chalk.white(
23-
'npm uninstall -g react-native && npm install -g react-native-cli'
24-
),
25-
].join('\n')
26-
);
27-
process.exit(1);
28-
} else {
29-
cliEntry.run();
30-
}
14+
cliEntry.run();

packages/cli/src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
*/
99

1010
// gracefulify() has to be called before anything else runs
11-
// eslint-disable-next-line no-unused-vars
12-
import gracefulFs from './util/gracefulFs';
13-
11+
import './util/gracefulifyFs';
1412
import cli from './cliEntry';
1513

1614
if (require.main === module) {
File renamed without changes.

packages/cli/src/util/isInstalledGlobally.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)