Repository: create-react-app
Issue: CRA Installs an old version of react-scripts and generates throws "The react-scripts version you're using is not compatible with the --template option."
Labels: needs triage,issue: bug report

---------------------------------------------------------------------
**UPDATE: I tried doing: `yarn create react-app my-app --template typescript` And it works fine. I think the issue has to do with linux and npm/npx.**
---------------------------------------------------------------------

### Describe the bug

I have a fresh install of Ubuntu 20 and when I do

`npx create-react-app my-app --template typescript
`
I get this error: **The react-scripts version you're using is not compatible with the --template option.**

![image](https://user-images.githubusercontent.com/49768251/162207008-59a9708e-8b1b-4c75-9a82-18d48cc2c525.png)

I did control + C but if I let the script continue it creates the react app without typescript.

And my app is created with Javascript and no tsx files. I checked on the **package.json generated by cra**. And I see this:

{
  "name": "my-app7",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-scripts": "0.9.5" **<---- I THINK THE ISSUE IS RIGHT HERE**
  },
  "devDependencies": {},
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

I did some research but I was not able to find how to specify the react-scripts version that cra should install. I tried also to create this app with a windows computer with same Node version and CRA 5.0.0 and It works fine. That's why I think it has to do with linux.

I have already checked with which that create-react-app is not installed globally. And I did the same with react-scripts.

### Did you try recovering your dependencies?

Things that I did:

- npm -g uninstall create-react-app react-scripts
- Cleaning npm cache with
- `npm uninstall -g create-react-app && npm i -g npm@latest && sudo npm cache clean -f && npx create-react-app my-app --template typescript`
- Did` npx create-react-app --version` and I get 5.0.0
- Did `npx clear-npx-cache`

With every single try I created a new app.

### Environment
After running: `npx create-react-app --info`

 current version of create-react-app: 5.0.0
  running from /home/yari/.npm/_npx/24521/lib/node_modules/create-react-app

  System:
    OS: Linux 5.13 Ubuntu 20.04.4 LTS (Focal Fossa)
    CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
  Binaries:
    Node: Not Found
    Yarn: Not Found
    npm: Not Found
  Browsers:
    Chrome: 100.0.4896.60
    Firefox: 98.0.2
  npmPackages:
    react: Not Found
    react-dom: Not Found
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: Not Found

**Although it says I have no binary for node and npm I have them installed and working.**

- Node in /snap/bin/node
- NPM in /snap/bin/npm

### Steps to reproduce

1. npx create-react-app my-app --template typescript

### Expected behavior

I want to get tsx files with Typescript applied.

### Actual behavior

I get js files.