Skip to content

Feature request: error out if using unsupported node when bootstrapping with --typescript #7715

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

Closed
city41 opened this issue Sep 21, 2019 · 4 comments

Comments

@city41
Copy link

city41 commented Sep 21, 2019

Is your proposal related to a problem?

When using an unsupported version of node (in my case, 8.9.4), create-react-app will still bootstrap an app, but with a warning:

Note: the project was bootstrapped with an old unsupported version of tools.
Please update to Node >=8.10 and npm >=5 to get supported tools in new project

This is reasonable behavior. But my problem is if you pass the --typescript argument, the bootstrapped app will be JavaScript.

Describe the solution you'd like

If using an unsupported version of node and passing the --typescript argument, I'd like CRA to error out and refuse to bootstrap the app with a descriptive error message.

  • it's pretty easy to miss the warning
  • when you look at the built app, it's confusing and frustrating it is JavaScript instead of TypeScript without an obvious explanation (assuming you miss the warning)

My hunch is I must be using an old version of CRA. But this happens with the recent versions of CRA, making the result even more confusing.

Additional context

I am using CRA version 3.1.2

If the team agrees this is a good change, I'd be happy to take a stab at a PR on it.

@iansu
Copy link
Contributor

iansu commented Sep 22, 2019

This is definitely unintended behavior. A better error message and then exiting seems like a reasonable solution. It’s interesting that it fails in this way. I’m curious why that is but I’m not by my computer at the moment.

@awaseem
Copy link
Contributor

awaseem commented Oct 17, 2019

If anyone wouldn't mind, I would love to work on this bug!

@iansu
Copy link
Contributor

iansu commented Oct 17, 2019

It's all yours!

@ianschmitz
Copy link
Contributor

I think this was supposed to be closed in #7839.

@lock lock bot locked and limited conversation to collaborators Oct 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants