File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,13 @@ function formatMessage(message, isError) {
102102 ] ;
103103 }
104104
105+ if ( lines [ 1 ] . match ( / C a n n o t f i n d m o d u l e .+ n o d e - s a s s / ) ) {
106+ lines [ 1 ] =
107+ 'To import Sass files in this project, you need to install node-sass.\n' ;
108+ lines [ 1 ] +=
109+ 'Please run `npm i node-sass --save` or `yarn add node-sass` inside your workspace.' ;
110+ }
111+
105112 // Cleans up syntax error messages.
106113 if ( lines [ 1 ] . indexOf ( 'Module build failed: ' ) === 0 ) {
107114 lines [ 1 ] = lines [ 1 ] . replace (
@@ -133,12 +140,6 @@ function formatMessage(message, isError) {
133140 ) ;
134141 }
135142
136- if ( lines [ 1 ] . match ( / s a s s - l o a d e r .+ n o d e - s a s s .+ i n s t a l l / ) ) {
137- lines [ 1 ] = 'You need to install `node-sass` to compile Sass files.\n' ;
138- lines [ 1 ] +=
139- 'Please run `npm i node-sass` or `yarn add node-sass` inside your workspace.' ;
140- }
141-
142143 lines [ 0 ] = chalk . inverse ( lines [ 0 ] ) ;
143144
144145 // Reassemble the message.
You can’t perform that action at this time.
0 commit comments