diff --git a/packages/webpack-cli/lib/webpack-cli.js b/packages/webpack-cli/lib/webpack-cli.js index cae401941d8..af821cbada3 100644 --- a/packages/webpack-cli/lib/webpack-cli.js +++ b/packages/webpack-cli/lib/webpack-cli.js @@ -357,7 +357,8 @@ class WebpackCLI { try { pkg = await promptInstallation(pkg, () => { - logger.error(`For using this command you need to install: '${green(commandName)}' package`); + const pkgName = pkg.includes('@webpack') ? pkg.slice(pkg.indexOf('/') + 1) : pkg; + logger.error(`For using this command you need to install: '${green(pkgName)}' package`); }); } catch (error) { logger.error(`Action Interrupted, use '${cyan('webpack-cli help')}' to see possible commands`);