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/.`);
76
76
let errorMessage = "" ;
77
77
78
78
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` ;
81
81
82
82
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` ;
84
84
}
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 ;
88
89
}
89
-
90
- console . error ( `${ errorMessage } \n\n\u001b[32mTIP: ${ instructions } ` ) ;
91
- Error . stackTraceLimit = 1 ;
92
- process . exitCode = 1 ;
93
- return ;
94
90
}
95
91
96
92
if ( err . name !== "ValidationError" ) {
You can’t perform that action at this time.
0 commit comments