We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 001c23e commit 42640dfCopy full SHA for 42640df
packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
@@ -175,14 +175,17 @@ function verifyTypeScriptSetup() {
175
176
parsedCompilerOptions = result.options;
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}` : '');
+ if (e && e.name === 'SyntaxError') {
+ console.error(
+ chalk.red.bold(
+ 'Could not parse',
+ chalk.cyan('tsconfig.json') + '.',
+ 'Please make sure it contains syntactically correct JSON.'
+ )
+ );
186
+ }
187
+
188
+ console.log(e && e.message ? `${e.message}` : '');
189
process.exit(1);
190
}
191
0 commit comments