Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keep getting error while creating react app

I have been trying to create a react app, so basically a new project such as hello world or anything.

I try using npx create-react-app my-app

The error I get is:

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

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 try following those steps and even uninstalled using npm uninstall -g create-react-app but I still keep getting the same error.

My npm version: 6.14.8

This is such a basic process to create a first application in react I am not sure why is it so complicated. Could someone please tell how can I fix that error and also how can I create an react app smoothly?

If more information is needed please feel free to comment down below:)

like image 802
Hem Avatar asked Nov 25 '20 04:11

Hem


People also ask

Why React app is not creating?

If you really need create-react-app , you might need to reinstall Node and reconfigure your dependencies to ensure you have a fresh start with Node, npm, npx, and the like.

How do you fix 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?

To solve the React. js error "You are running create-react-app 4.0. 3, which is behind the latest release (5.0. 0)", run the npx clear-npx-cache command and re-run your app creation command, e.g. npx create-react-app my-app .

Which create React app not found?

Use npx to solve the error "create-react-app: command not found", e.g. npx create-react-app my-app or install the package globally by running npm install -g create-react-app to be able to use the command without the npx prefix. The fastest way to solve the error is to use the npx command. Copied!


Video Answer


2 Answers

npm install -g create-react-app

Above fixed it for me.

like image 193
Mayuresh Srivastava Avatar answered Dec 08 '22 20:12

Mayuresh Srivastava


Worked for me:

npm uninstall -g create-react-app
npm install -g create-react-app
npx create-react-app app-name
like image 34
Kashif Ali Avatar answered Dec 08 '22 19:12

Kashif Ali