File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -76,21 +76,17 @@ For more information, see https://webpack.js.org/api/cli/.`);
7676 let errorMessage = "" ;
7777
7878 if ( moduleName === "webpack" ) {
79- errorMessage = `\n\u001b[31m ${ moduleName } not installed` ;
80- instructions = `Consider installing it using " npm install --save-dev ${ moduleName } " \n` ;
79+ errorMessage = `\n${ moduleName } not installed` ;
80+ instructions = `Install webpack to start bundling: \u001b[32m\n $ npm install --save-dev ${ moduleName } \n` ;
8181
8282 if ( process . env . npm_execpath !== undefined && process . env . npm_execpath . includes ( "yarn" ) ) {
83- instructions = `Consider installing it using " yarn add ${ moduleName } --dev " \n` ;
83+ instructions = `Install webpack to start bundling: \u001b[32m\n $ yarn add ${ moduleName } --dev\n` ;
8484 }
85- } else {
86- errorMessage = `\n\u001b[31mModule ${ moduleName } is not found but is imported in configuration` ;
87- instructions = `If ${ moduleName } is a package, install it using a package manager\n` ;
85+ Error . stackTraceLimit = 1 ;
86+ console . error ( `${ errorMessage } \n\n${ instructions } ` ) ;
87+ process . exitCode = 1 ;
88+ return ;
8889 }
89-
90- console . error ( `${ errorMessage } \n\n\u001b[32mTIP: ${ instructions } ` ) ;
91- Error . stackTraceLimit = 1 ;
92- process . exitCode = 1 ;
93- return ;
9490 }
9591
9692 if ( err . name !== "ValidationError" ) {
You can’t perform that action at this time.
0 commit comments