Feature request: error out if using unsupported node when bootstrapping with --typescript
Created by: city41
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.