Created by: awaseem
This PR related to #7715 (closed)
Problem
When using the --typescript
option with create-react-app
with an unsupported version node.js ie. from the issue 8.9.4. It creates a React project, but completely ignores the TypeScript template.
Whats happening is that before this fix, if you're using an unsupported version of Node.js, createReactApp.js
falls back to using version 0.9.5
. Within 0.9.5
, the init script (or scripts/init.js
) there is no code paths that support the TypeScript option. This is why you can still get a react app project, but without TypeScript being configured.
Solution
Within createReactApp.js
I just added a check and error message that tells the user they must upgrade to a supported version to continue
Testing
I tested the command using nvm
, 8.10 fully created a TypeScript project but anything below exits with the following message:
You are using Node v8.9.4 with the TypeScript template. Since the old unsuporoted version of tools do not supported TypeScript, you will have to upgrade.
Please update to Node 8.10 or higher for a better, fully supported experience.
Please let me know if you have any questions!