diff --git a/packages/react-scripts/scripts/build.js b/packages/react-scripts/scripts/build.js
index 8b1cd4cc48f4c3c338c20e658e90b74d294873f4..d40912f287554d4dd7fd6c55fc308d45bd582b3c 100644
--- a/packages/react-scripts/scripts/build.js
+++ b/packages/react-scripts/scripts/build.js
@@ -165,7 +165,7 @@ function build(previousSizeMap) {
       console.log('To publish it at ' + chalk.green(homepagePath) + ', run:');
       console.log();
       if (useYarn) {
-        console.log('  ' + chalk.cyan('yarn') +  ' add gh-pages');
+        console.log('  ' + chalk.cyan('yarn') +  ' add --dev gh-pages');
       } else {
         console.log('  ' + chalk.cyan('npm') +  ' install --save-dev gh-pages');
       }