File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 29
29
// Do not make breaking changes! We absolutely don't want to have to
30
30
// tell people to update their global version of create-react-app.
31
31
//
32
+ // Also be careful with new language features.
33
+ // This file must work on Node 0.10+.
34
+ //
32
35
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33
36
// /!\ DO NOT MODIFY THIS FILE /!\
34
37
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -190,15 +193,15 @@ function checkAppName(appName) {
190
193
if ( allDependencies . indexOf ( appName ) >= 0 ) {
191
194
console . error (
192
195
chalk . red (
193
- `Can't use "${ appName } " as the app name because a dependency with the same name exists.\n\n` +
194
- `Following names ${ chalk . red . bold ( 'must not' ) } be used:\n\n`
195
- )
196
-
197
- +
198
-
196
+ 'We cannot create a project called `' + appName + '` because a dependency with the same name exists.\n' +
197
+ 'Due to the way npm works, the following names are not allowed:\n\n'
198
+ ) +
199
199
chalk . cyan (
200
- allDependencies . map ( depName => ` ${ depName } ` ) . join ( '\n' )
201
- )
200
+ allDependencies . map ( function ( depName ) {
201
+ return ' ' + depName ;
202
+ } ) . join ( '\n' )
203
+ ) +
204
+ chalk . red ( '\n\nPlease choose a different project name.' )
202
205
) ;
203
206
process . exit ( 1 ) ;
204
207
}
You can’t perform that action at this time.
0 commit comments