Skip to content

Unclear fatal error when JSX not configured in rescript.json #7468

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

Open
cknitt opened this issue May 13, 2025 · 1 comment
Open

Unclear fatal error when JSX not configured in rescript.json #7468

cknitt opened this issue May 13, 2025 · 1 comment
Milestone

Comments

@cknitt
Copy link
Member

cknitt commented May 13, 2025

When one forgets to configure the JSX settings in rescript.json and tries to compile a ReScript source file containing JSX, one gets the following error:

Fatal error: exception Failure("Pexp_jsx_element is expected to be transformed at this point")

Instead, the user should get a clearer and more actionable error message, maybe something like

Cannot compile JSX expression because JSX support is not enabled. Add"jsx" settings to rescript.json to enable JSX support.

@cknitt cknitt added this to the v12 milestone May 13, 2025
@cometkim
Copy link
Member

Random idea: if ReScript provides a default jsx runtime, we could provide a default config for jsx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants