File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
packages/react-scripts/scripts/utils Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -175,14 +175,17 @@ function verifyTypeScriptSetup() {
175
175
176
176
parsedCompilerOptions = result . options ;
177
177
} catch ( e ) {
178
- console . error (
179
- chalk . red . bold (
180
- 'Could not parse' ,
181
- chalk . cyan ( 'tsconfig.json' ) + '.' ,
182
- 'Please make sure it contains syntactically correct JSON.'
183
- )
184
- ) ;
185
- console . error ( e && e . message ? `Details: ${ e . message } ` : '' ) ;
178
+ if ( e && e . name === 'SyntaxError' ) {
179
+ console . error (
180
+ chalk . red . bold (
181
+ 'Could not parse' ,
182
+ chalk . cyan ( 'tsconfig.json' ) + '.' ,
183
+ 'Please make sure it contains syntactically correct JSON.'
184
+ )
185
+ ) ;
186
+ }
187
+
188
+ console . log ( e && e . message ? `${ e . message } ` : '' ) ;
186
189
process . exit ( 1 ) ;
187
190
}
188
191
You can’t perform that action at this time.
0 commit comments