Created by: mrmckeb
Unfortunately this is a tricky problem. As @Timer pointed out, a global install catch would be triggered on npx
and yarn create
runs.
I couldn't find a way to determine if the user had initialised create-react-app
with npx
or yarn create
specifically (although I was able to find out if they used yarn
or npm
) - but there may be a method I missed.
An alternative option is to use the command npm view create-react-app version
- which returns the latest version as a string. This solution, however, is slow.
This PR:
- Resolves #7422 (closed)
- Closes #7452