Repository: create-react-app
Issue: npx create-react-app myproj --template typescript fails on macOS
Labels: needs triage,issue: bug report

<!--
    Please note that your issue will be fixed much faster if you spend about
    half an hour preparing it, including the exact reproduction steps and a demo.

    If you're in a hurry or don't feel confident, it's fine to report bugs with
    less details, but this makes it less likely they'll get fixed soon.

    In either case, please use this template and fill in as many fields below as you can.

    Note that we don't provide help for webpack questions after ejecting.
    You can find webpack docs at https://webpack.js.org/.
-->

### Describe the bug

running `npx create-react-app my-project --template` fails to create a proper project.  

### Did you try recovering your dependencies?
```
 % npm --version
9.2.0
% 
```
There is no project to recover, as this is a new project. Here is the entire process:

```sh
% npm uninstall -g create-react-app

up to date in 41ms
% yarn global remove create-react-app
yarn global v1.22.17
[1/2] 🗑  Removing module create-react-app...
error This module isn\'t specified in a package.json file.
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
% npx create-react-app my-project --template typescript
Creating a new React app in /Users/davidgs/github.com/my-project

Installing packages. This might take a couple minutes.
Installing react, react-dom, and react-scripts...

yarn add v1.22.17
info No lockfile found.
...
✨  Done in 34.16s.

A template was not provided. This is likely because you\'re using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.
You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.
% ls-l my-project
total 816
drwxr-xr-x  793 davidgs  staff   25376 Dec 21 10:14 node_modules
-rw-r--r--    1 davidgs  staff     198 Dec 21 10:14 package.json
-rw-r--r--    1 davidgs  staff  413630 Dec 21 10:14 yarn.lock
```

As you can see, `create-react-app` is wrong about the globally installed version (I have checked the `node_modules` directory for globally installed packages at `/usr/local/lib` and there is no globally installed package there). This could be a documentation issue in that it _always_ says that (which is misleading) or it incorrectly assumes there is a globally installed version, or that it find a globally installed version somewhere (in which case it should report *where* it found that version). 

But the end result is that an incomplete, and non-functional, app directory is created. 


### Which terms did you search for in User Guide?

I read [this section](https://create-react-app.dev/docs/adding-typescript/) of the user guide, as well as Issue #6119 (now closed).

### Environment

```sh
my-project % npx create-react-app --info
Please specify the project directory:
  create-react-app <project-directory>

For example:
  create-react-app my-react-app

Run create-react-app --help to see all options.
```

Further indication that the `create-react-app` script fails to create a proper project. 

### Steps to reproduce

See above section where I provided all the commands and output. 

### Expected behavior

Should have been a complete react application. Instead, it was ... garbage. 
### Actual behavior

### Reproducible demo

<!--
  If you can, please share a project that reproduces the issue.
  This is the single most effective way to get an issue fixed soon.

  There are two ways to do it:

    * Create a new app and try to reproduce the issue in it.
      This is useful if you roughly know where the problem is, or can’t share the real code.

    * Or, copy your app and remove things until you’re left with the minimal reproducible demo.
      This is useful for finding the root cause. You may then optionally create a new project.

  This is a good guide to creating bug demos: https://stackoverflow.com/help/mcve
  Once you’re done, push the project to GitHub and paste the link to it below:
-->

(Paste the link to an example project and exact instructions to reproduce the issue.)

<!--
  What happens if you skip this step?

  We will try to help you, but in many cases it is impossible because crucial
  information is missing. In that case we'll tag an issue as having a low priority,
  and eventually close it if there is no clear direction.

  We still appreciate the report though, as eventually somebody else might
  create a reproducible example for it.

  Thanks for helping us help you!
-->