From 061aa2cd23991604e836b93b397e4c9c3447d054 Mon Sep 17 00:00:00 2001
From: Dan Abramov <dan.abramov@gmail.com>
Date: Sun, 18 Sep 2016 14:16:06 +0300
Subject: [PATCH] Tweak app name error message

---
 global-cli/index.js | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/global-cli/index.js b/global-cli/index.js
index 1ac63a81a..94a3497a9 100644
--- a/global-cli/index.js
+++ b/global-cli/index.js
@@ -29,6 +29,9 @@
 // Do not make breaking changes! We absolutely don't want to have to
 // tell people to update their global version of create-react-app.
 //
+// Also be careful with new language features.
+// This file must work on Node 0.10+.
+//
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //   /!\ DO NOT MODIFY THIS FILE /!\
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -190,15 +193,15 @@ function checkAppName(appName) {
   if (allDependencies.indexOf(appName) >= 0) {
     console.error(
       chalk.red(
-        `Can't use "${appName}" as the app name because a dependency with the same name exists.\n\n` +
-        `Following names ${chalk.red.bold('must not')} be used:\n\n`
-      )
-
-      +
-
+        'We cannot create a project called `' + appName + '` because a dependency with the same name exists.\n' +
+        'Due to the way npm works, the following names are not allowed:\n\n'
+      ) +
       chalk.cyan(
-        allDependencies.map(depName => `  ${depName}`).join('\n')
-      )
+        allDependencies.map(function(depName) {
+          return '  ' + depName;
+        }).join('\n')
+      ) +
+      chalk.red('\n\nPlease choose a different project name.')
     );
     process.exit(1);
   }
-- 
GitLab