File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 2929// Do not make breaking changes! We absolutely don't want to have to
3030// tell people to update their global version of create-react-app.
3131//
32+ // Also be careful with new language features.
33+ // This file must work on Node 0.10+.
34+ //
3235// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3336// /!\ DO NOT MODIFY THIS FILE /!\
3437// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -190,15 +193,15 @@ function checkAppName(appName) {
190193 if ( allDependencies . indexOf ( appName ) >= 0 ) {
191194 console . error (
192195 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+ ) +
199199 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.' )
202205 ) ;
203206 process . exit ( 1 ) ;
204207 }
You can’t perform that action at this time.
0 commit comments