From b5e19139c8c33d396778f35f2fdf088fbd44f3d2 Mon Sep 17 00:00:00 2001 From: Pranshu Chittora Date: Sat, 1 Jun 2019 21:47:38 +0530 Subject: [PATCH] fix(cli): updates err message updates the err message --- bin/cli.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index 3172e6930d1..47a29643138 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -72,16 +72,17 @@ For more information, see https://webpack.js.org/api/cli/.`); } catch (err) { if (err.code === "MODULE_NOT_FOUND") { let errorMessage = - "\n\u001b[31mwebpack not found, \u001b[33mplease install webpack using\n\t\u001b[32mnpm install --save-dev webpack\n"; + "\n\u001b[31mwebpack not installed, consider installing it using \n\u001b[32mnpm install --save-dev webpack\n"; if (process.env.npm_execpath !== undefined && process.env.npm_execpath.includes("yarn")) { errorMessage = - "\n\u001b[31mwebpack not found, \u001b[33mplease install webpack using\n\t\u001b[32myarn add webpack --dev\n"; + "\n\u001b[31mwebpack not installed, consider installing it using \n\u001b[32myarn add webpack --dev\n"; } console.error(errorMessage); Error.stackTraceLimit = 1; process.exitCode = 1; + return; } if (err.name !== "ValidationError") { @@ -107,7 +108,7 @@ For more information, see https://webpack.js.org/api/cli/.`); */ const stdout = argv.silent ? { - write: () => {} + write: () => {} } // eslint-disable-line : process.stdout;