Shruti sharma
Shruti sharma

Reputation: 211

React version issue. Not able to upgrade version

I am not able to install latest version of react. Actually I installed a particlar version after appending @ , after that what ever I am doing it is not working. even I unistalled nodejs completely. still it is not working.

npm react --version
6.14.15

Then I ran this

npm install --save react@latest

After that version is still coming same.

 npm react --version
    6.14.15

After that I uninstalled react using below

npm uninstall -g create-react-app

I also did

   npm uninstall react 

and then checked the version. it is still coming same.

I followed onw blog and tried below. still it dint work.

npm install [email protected] [email protected] [email protected]

and installed react again. still it is giving same version. Could you please help me on the same. Is there any to remove it completely from the system?

Upvotes: 0

Views: 869

Answers (1)

Naveenkumar M
Naveenkumar M

Reputation: 679

Let understand the diff between react and create react app. React is a js library for creating user interfaces but and create react app is a cli tool that help us to create the files template for a react project and both are totally different npm packages. enter image description here The create react app doesn't depend on react so it doesn't install the required version of react.
If you want to upgrade your react library you have to install react

npm i -g react@latest

Upvotes: 2

Related Questions