Skip to content
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

feat: remove hacky check for faulty global react-native installation #198

Merged
merged 1 commit into from
Mar 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions packages/cli/src/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/

import chalk from 'chalk';
import isInstalledGlobally from './util/isInstalledGlobally';
import logger from './util/logger';
import cliEntry from '.';

if (isInstalledGlobally()) {
logger.error(
[
'Looks like you installed react-native globally, maybe you meant react-native-cli? ',
'To fix the issue, run: ',
chalk.white(
'npm uninstall -g react-native && npm install -g react-native-cli'
),
].join('\n')
);
process.exit(1);
} else {
cliEntry.run();
}
cliEntry.run();
4 changes: 1 addition & 3 deletions packages/cli/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
*/

// gracefulify() has to be called before anything else runs
// eslint-disable-next-line no-unused-vars
import gracefulFs from './util/gracefulFs';

import './util/gracefulifyFs';
import cli from './cliEntry';

if (require.main === module) {
Expand Down
25 changes: 0 additions & 25 deletions packages/cli/src/util/isInstalledGlobally.js

This file was deleted.