Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade all libraries in an old react native project?

I have some experience in react native but I am relatively new to the field. I have cloned a react native project but it is very old and it contains a lot of libraries that are also either depricated or conflicting. I want to make the project compile as its not compiling now too because of the conflicting library issues. Any help or guidance regarding what i should do to make it work?

I have tried a number of things like deleting node modules and package-lock and running npm install but it doesnt run so I used --force but it still didnt make it work then I used npm install --legacy-peer-deps and it still didnt work. i tried to upgrade the specific libraries that were mentioned in the errors but they also failed.

right now I have no idea what should be done.

like image 597
MAC_1996 Avatar asked Oct 23 '25 11:10

MAC_1996


1 Answers

As of npm version 5.2.0+, we can update all our dependencies without installing any additional packages.

Run the command in the root of your project:

npx npm-check-updates -u && npm i

"npx npm-check-updates -u" the command just updates the package.json that’s why we need tonpm i after the update the package.json.

for more info click here

like image 168
John Ocean Avatar answered Oct 25 '25 09:10

John Ocean



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!