如何升级本机版本?

时间:2019-07-18 16:26:48

标签: react-native upgrade

我试图将我的本机版本更新为最新版本。即本机0.60.3 这两种方法出现以下错误。

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 react-native@0.60.4. 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 react-native@0.60.3

info Fetching diff between v0.59.9 and v0.60.3...
error Failed to fetch diff for react-native@0.60.3. Maybe it's not released yet?
info For available releases to diff see: https://github.com/react-native-community/rn-diff-purge#version-changes

2 个答案:

答案 0 :(得分:1)

我得到了解决方案: 只需列出所有需要更新的软件包,并获取所有具有最新版本的软件包。 通过npm使用以下内容。

npm i -g npm-check-updates
ncu -u
npm install

答案 1 :(得分:0)

我有同样的问题。我该如何解决?

  • 将package.json设置更改为原生0.59.10
  • 运行npm install
  • 立即运行react-native upgrade