Skip to content

Commit ccc1797

Browse files
krizzuthymikee
authored andcommitted
fix: correct paths for eject command (#208)
Summary: --------- `eject` had wrong paths (pointing to old RN directories), so this PR fixes that. Fixes #207 Test Plan: ---------- 1. Init new project RN 0.59+ 2. Remove `android` and/or `ios` 3. Use the `eject` command to generate ios/android projects
1 parent 82087ef commit ccc1797

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

packages/cli/src/commands/eject/eject.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,7 @@ function eject() {
7171
if (!doesIOSExist) {
7272
logger.info('Generating the iOS folder.');
7373
copyProjectTemplateAndReplace(
74-
path.resolve(
75-
'node_modules',
76-
'react-native',
77-
'@react-native-community',
78-
'cli',
79-
'templates',
80-
'HelloWorld',
81-
'ios',
82-
),
74+
path.resolve('node_modules', 'react-native', 'template', 'ios'),
8375
path.resolve('ios'),
8476
appName,
8577
templateOptions,
@@ -89,15 +81,7 @@ function eject() {
8981
if (!doesAndroidExist) {
9082
logger.info('Generating the Android folder.');
9183
copyProjectTemplateAndReplace(
92-
path.resolve(
93-
'node_modules',
94-
'react-native',
95-
'@react-native-community',
96-
'cli',
97-
'templates',
98-
'HelloWorld',
99-
'android',
100-
),
84+
path.resolve('node_modules', 'react-native', 'template', 'android'),
10185
path.resolve('android'),
10286
appName,
10387
templateOptions,

0 commit comments

Comments
 (0)