Eli Yair
Eli Yair

Reputation: 47

how to install the new version of react app 5.0.0

I've been trying to install a new app for my project. and I have an issue running it on my vs code. now, I was trying to uninstall from the global and its still output the same error. did some one ran into this error lately?

The ERROR output in the terminal: "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:

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

thanks ahead.

Upvotes: 2

Views: 9152

Answers (6)

Aditi Jaiswal
Aditi Jaiswal

Reputation: 16

None of the other answers worked for me.

In my case this command worked:

npm init react-app my-app

Upvotes: 0

wangshuai
wangshuai

Reputation: 1

You can run this command

yarn global add [email protected]

Upvotes: 0

Chief
Chief

Reputation: 119

None of the other answers worked for me. I don't know-how but what Gautam Kothari commented (in a way) above worked. I had to install the latest version of React:

In my case:

npm install --save [email protected] 

Then I installed the latest version of create-react-app

npx [email protected] my_app

Upvotes: 0

ABU SAID
ABU SAID

Reputation: 47

You can run this command to create new app with version 5.0.0

npx [email protected] my-app

or

run this command and clear npx cache

npx clear-npx-cache

then run this command to create react app

npx create-react-app my-app

Upvotes: 1

Eli Yair
Eli Yair

Reputation: 47

thank you guys for your help. ive found the solution. i entered the following link: https://create-react-app.dev/docs/getting-started/

and then found this link inside that guide me through : https://gist.github.com/gaearon/4064d3c23a77c74a3614c498a8bb1c5f

and this is the solution:

If you use npm 5.1 or earlier, you can't use npx. Instead, install create-react-app globally:

npm install -g create-react-app Now you can run:

create-react-app my-app

thanks again for the contribute!

Upvotes: 2

user17725156
user17725156

Reputation: 11

npx create-react-app@latest my-app

Upvotes: 1

Related Questions