Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggests that tsconfig.json is incorrect only when SyntaxError is caught #6160

Merged
merged 3 commits into from Apr 4, 2019

Conversation

@Andarist
Copy link
Contributor

commented Jan 9, 2019

Otherwise I get i.e. such output;

Could not parse tsconfig.json. Please make sure it contains syntactically correct JSON.
Details: tsconfig.json(19,12): error TS1328: Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal.

Which is misleading - especially taking into account that info about incorrect JSON is written in bold

@jenbuzz
Copy link

left a comment

Seems ok but in what case would this an error that is not related to syntax. What did your tsconfig look like?

Looks like a test is now failing

@Andarist

This comment has been minimized.

Copy link
Contributor Author

commented Jan 18, 2019

Seems ok but in what case would this an error that is not related to syntax. What did your tsconfig look like?

I've pasted in the error I've received - as you might see it's not related to the JSON syntax, but rather purely about misconfiguring TS.

Looks like a test is now failing

Seems unrelated, I'll try rebasing.

@Andarist Andarist force-pushed the Andarist:patch-1 branch from d652ef3 to cec8f0d Jan 18, 2019

@stale

This comment has been minimized.

Copy link

commented Feb 17, 2019

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Feb 17, 2019

@Andarist

This comment has been minimized.

Copy link
Contributor Author

commented Feb 17, 2019

BUMP for stale bot

@stale stale bot removed the stale label Feb 17, 2019

@stale

This comment has been minimized.

Copy link

commented Mar 19, 2019

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Mar 19, 2019

)
);
}

console.error(e && e.message ? `Details: ${e.message}` : '');

This comment has been minimized.

Copy link
@iansu

iansu Mar 21, 2019

Collaborator

Drop "Details: " from the start of the error message because it doesn't really make sense in the case of non-syntax error.

@stale stale bot removed the stale label Mar 21, 2019

@iansu iansu self-assigned this Mar 21, 2019

@iansu iansu added this to the 3.0 milestone Mar 21, 2019

@iansu iansu added this to In progress in v3 via automation Mar 21, 2019

@amyrlam amyrlam force-pushed the facebook:master branch from cecd762 to d3b19f9 Mar 24, 2019

);
}

console.error(e && e.message ? `${e.message}` : '');

This comment has been minimized.

Copy link
@ianschmitz

ianschmitz Apr 3, 2019

Collaborator

Do we want to console.error() again even if it's a SyntaxError?

This comment has been minimized.

Copy link
@iansu

iansu Apr 3, 2019

Collaborator

Good point. console.log is probably fine here.

@iansu iansu closed this Apr 4, 2019

v3 automation moved this from In progress to Done Apr 4, 2019

@iansu iansu reopened this Apr 4, 2019

v3 automation moved this from Done to In progress Apr 4, 2019

@iansu iansu merged commit 42640df into facebook:master Apr 4, 2019

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Docs deploy preview succeeded
Details

v3 automation moved this from In progress to Done Apr 4, 2019

@lock lock bot locked and limited conversation to collaborators Apr 9, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.