Fix flow types
Summary: This diff ignores the `react-native-local-cli` from being used internally. Unfortunately, since `react-native-local-cli` has its own dependency on Metro, and using `yarn` selective resolutions causes some issues with `flow` rechecks that have not been resolved (https://fb.facebook.com/groups/flow/permalink/2220467474668522/), the easiest way to move forward is to just not install the `react-native-local-cli` package internally (we don't need it since we have our own cli). Reviewed By: pvdz Differential Revision: D13377495 fbshipit-source-id: 6d6edbd947104e050ad1c31a657fc21fe6848692
This commit is contained in:
parent
167d7861cb
commit
c8047bfe66
|
@ -11,7 +11,6 @@
|
|||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const findPlugins = require('react-native-local-cli/core/findPlugins');
|
||||
|
||||
const REACT_NATIVE_CI = process.cwd() === path.resolve(__dirname, '..');
|
||||
|
||||
|
@ -23,7 +22,22 @@ if (REACT_NATIVE_CI) {
|
|||
pluginsPath = '../../../';
|
||||
}
|
||||
|
||||
const plugins = findPlugins([path.resolve(__dirname, pluginsPath)]);
|
||||
function getPlugins() {
|
||||
try {
|
||||
const findPlugins = require('react-native-local-cli/core/findPlugins');
|
||||
|
||||
return findPlugins([path.resolve(__dirname, pluginsPath)]);
|
||||
} catch (_) {
|
||||
return {
|
||||
haste: {
|
||||
providesModuleNodeModules: [],
|
||||
platforms: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const plugins = getPlugins();
|
||||
|
||||
// Detect out-of-tree platforms and add them to the whitelists
|
||||
const pluginRoots /*: Array<
|
||||
|
|
Loading…
Reference in New Issue