Home > Mobile >  npx create-react-app prompting to globally uninstall non-existent create-react-app package?
npx create-react-app prompting to globally uninstall non-existent create-react-app package?

Time:12-15

I am having problems with npx create-react-app involving global installs. My confusion arises because as far as I'm aware the create-react-app package is not installed on my machine.

Some Details:

I start a react project (with typescript template) as I have previously and recently done on this same machine a number of times:

npx create-react-app --template typescript .

I get this prompt from the terminal

Need to install the following packages: create-react-app Ok to proceed? (y)

I press y to confirm it's okay to proceed. (If I press n, the process terminates with the following error: npm ERR! canceled.) The terminal then displays the following message

You are running `create-react-app` 4.0.3, which is behind the latest release (5.0.0).

We no longer support global installation of Create React App.

Please remove any global installs with one of the following commands:
- npm uninstall -g create-react-app
- yarn global remove create-react-app

The latest instructions for creating a new app can be found here:
https://create-react-app.dev/docs/getting-started/

I run both suggested commands to uninstall create-react-app globally. npm goes smoothly:


npm uninstall -g create-react-app

up to date, audited 1 package in 179ms

found 0 vulnerabilities

the global yarn uninstall results with the following message:

remove create-react-app
yarn global v1.22.17
warning package.json: No license field
[1/2]            
  • Related