@@ -113,7 +113,7 @@ https://github.com/npm/npm/issues/16991
113
113
let args = [ ] ;
114
114
115
115
if ( useYarn ) {
116
- command = 'yarn ' ;
116
+ command = 'yarnpkg ' ;
117
117
} else {
118
118
command = 'npm' ;
119
119
args = [ 'install' , '--save' ] ;
@@ -123,14 +123,10 @@ https://github.com/npm/npm/issues/16991
123
123
}
124
124
}
125
125
126
- log ( `Installing dependencies using ${ command } ...` ) ;
126
+ const npmOrYarn = useYarn ? 'yarn' : 'npm' ;
127
+ log ( `Installing dependencies using ${ npmOrYarn } ...` ) ;
127
128
log ( ) ; // why is this here
128
129
129
- if ( command === 'yarn' ) {
130
- // Use the more unique `yarnpkg` alias to avoid naming conflicts with other tools.
131
- command = 'yarnpkg' ;
132
- }
133
-
134
130
const proc = spawn ( command , args , { stdio : 'inherit' } ) ;
135
131
proc . on ( 'close' , code => {
136
132
if ( code !== 0 ) {
@@ -153,30 +149,30 @@ https://github.com/npm/npm/issues/16991
153
149
Success! Created ${ appName } at ${ appPath }
154
150
Inside that directory, you can run several commands:
155
151
156
- ${ chalk . cyan ( command + ' start' ) }
152
+ ${ chalk . cyan ( npmOrYarn + ' start' ) }
157
153
Starts the development server so you can open your app in the Expo
158
154
app on your phone.
159
155
160
- ${ chalk . cyan ( command + ' run ios' ) }
156
+ ${ chalk . cyan ( npmOrYarn + ' run ios' ) }
161
157
(Mac only, requires Xcode)
162
158
Starts the development server and loads your app in an iOS simulator.
163
159
164
- ${ chalk . cyan ( command + ' run android' ) }
160
+ ${ chalk . cyan ( npmOrYarn + ' run android' ) }
165
161
(Requires Android build tools)
166
162
Starts the development server and loads your app on a connected Android
167
163
device or emulator.
168
164
169
- ${ chalk . cyan ( command + ' test' ) }
165
+ ${ chalk . cyan ( npmOrYarn + ' test' ) }
170
166
Starts the test runner.
171
167
172
- ${ chalk . cyan ( command + ' run eject' ) }
168
+ ${ chalk . cyan ( npmOrYarn + ' run eject' ) }
173
169
Removes this tool and copies build dependencies, configuration files
174
170
and scripts into the app directory. If you do this, you can’t go back!
175
171
176
172
We suggest that you begin by typing:
177
173
178
174
${ chalk . cyan ( 'cd ' + cdpath ) }
179
- ${ chalk . cyan ( command + ' start' ) } `
175
+ ${ chalk . cyan ( npmOrYarn + ' start' ) } `
180
176
) ;
181
177
182
178
if ( readmeExists ) {
0 commit comments