Sam
Sam

Reputation: 30288

How do I update npm packages in Expo

In my regular React Native projects, I run npm update {package-name} regularly to make sure my libraries are up-to-date. For example, I use a third party user authentication package and want to make sure that I use the latest stable version.

What is the Expo equivalent of npm update?

I understand using expo install {package-name} has an advantage over npm i {package-name} in that it makes sure the installed version of the package will be compatible with Expo SDK the app is using. That's why I'm reluctant to run npm update {package-name} and want to put Expo in the equation.

How do I update my npm packages in my Expo app?

Upvotes: 22

Views: 27569

Answers (5)

Rahul Kumar
Rahul Kumar

Reputation: 1

I was facing the same issue while working on the react application.Facing issue in react SDK version, I had updated the SDK version to latest one but dependencies were exist the older one. I recommond to avoid the this developer can prefer below command:

npm update

this will automatically update to your project with latest or required compatble versions for all dependencies.

post that you also verify this to inside your package.json file.

Thanks for reading this.. kudos to all developer...

Upvotes: -1

Tobias
Tobias

Reputation: 41

Just because this was the first result on google. The correct way (at least today) is: npx expo install --fix

Upvotes: 4

user1502826
user1502826

Reputation: 573

Run npx expo install --check and it will advice on what needs to be updated.

Upvotes: 16

henrique hallmann
henrique hallmann

Reputation: 29

Run expo upgrade according to your expo sdk, here is the last one so far follow https://blog.expo.dev/expo-sdk-45-f4e332954a68

Upvotes: 1

Wellington Nascimento
Wellington Nascimento

Reputation: 80

expo only updates the third packages with the core update of expo sdk, so you have to wait to ensure the compatibily.

Upvotes: 4

Related Questions