File tree 1 file changed +2
-16
lines changed
packages/cli/src/commands/init
1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -49,22 +49,8 @@ function init(projectDir, argsOrName) {
49
49
* @param options Command line arguments parsed by minimist.
50
50
*/
51
51
function generateProject ( destinationRoot , newProjectName , options ) {
52
- const reactNativePackageJson = require ( 'react-native/package.json' ) ;
53
- const { peerDependencies} = reactNativePackageJson ;
54
- if ( ! peerDependencies ) {
55
- logger . error (
56
- "Missing React peer dependency in React Native's package.json. Aborting." ,
57
- ) ;
58
- return ;
59
- }
60
-
61
- const reactVersion = peerDependencies . react ;
62
- if ( ! reactVersion ) {
63
- logger . error (
64
- "Missing React peer dependency in React Native's package.json. Aborting." ,
65
- ) ;
66
- return ;
67
- }
52
+ const pkgJson = require ( 'react-native/package.json' ) ;
53
+ const reactVersion = pkgJson . peerDependencies . react ;
68
54
69
55
const packageManager = new PackageManager ( {
70
56
projectDir : destinationRoot ,
You can’t perform that action at this time.
0 commit comments