Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !7839

added check for typescript template and unsupported node version

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/awaseem/master into master Oct 17, 2019
  • Overview 8
  • Commits 2
  • Pipelines 0
  • Changes 1

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!

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/awaseem/master