How can I upgrade the react-native version?
Asked Answered
M

2

9

I tried to update my react-native version to latest one. i.e react-native 0.60.3 I got the following error with these two methods.

C:\Users\Kamlesh\Desktop\Final Project>react-native upgrade

info No version passed. Fetching latest...
info Fetching diff between v0.59.9 and v0.60.4...
error Failed to fetch diff for [email protected]. Maybe it's not released yet?
info For available releases to diff see: https://github.com/react-native-community/rn-diff-purge#version-changes```


C:\Users\Kamlesh\Desktop\Final Project>react-native upgrade [email protected]

info Fetching diff between v0.59.9 and v0.60.3...
error Failed to fetch diff for [email protected]. Maybe it's not released yet?
info For available releases to diff see: https://github.com/react-native-community/rn-diff-purge#version-changes
Merill answered 18/7, 2019 at 16:26 Comment(1)
You should make sure that you are using the most recent version of the @react-native-community/cliNostrum
C
5

I had the same problem. How do I fixed?

  • change package.json setting react-native to 0.59.10
  • run npm install
  • now run react-native upgrade
Colorable answered 22/7, 2019 at 0:10 Comment(0)
M
3

I got the solution: Simply list all the packages which needs to be updated and get all the packages with the latest version. Use the following using npm.

npm i -g npm-check-updates
ncu -u
npm install
Merill answered 22/8, 2019 at 3:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.