We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 803946f commit cec8f0dCopy full SHA for cec8f0d
packages/react-scripts/scripts/utils/verifyTypeScriptSetup.js
@@ -172,13 +172,16 @@ function verifyTypeScriptSetup() {
172
173
parsedCompilerOptions = result.options;
174
} catch (e) {
175
- console.error(
176
- chalk.red.bold(
177
- 'Could not parse',
178
- chalk.cyan('tsconfig.json') + '.',
179
- 'Please make sure it contains syntactically correct JSON.'
180
- )
181
- );
+ 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.'
+ )
182
+ );
183
+ }
184
+
185
console.error(e && e.message ? `Details: ${e.message}` : '');
186
process.exit(1);
187
}
0 commit comments