react-native升级返回未定义的“ toLowerCase”

时间:2019-08-30 19:16:36

标签: react-native

我正在尝试将本机反应更新为最新版本。我运行命令:react-native upgrade --verbose

但是,它正在返回:

info No version passed. Fetching latest...
info Fetching diff between v0.59.8 and v0.60.5...
error Cannot read property 'toLowerCase' of undefined
debug TypeError: Cannot read property 'toLowerCase' of undefined
    at getPatch (/Users/myUser/Documents/React Native/myApp/node_modules/@react-native-community/cli/build/commands/upgrade/upgrade.js:109:121)
    at process._tickCallback (internal/process/next_tick.js:68:7)

如何升级本机反应?

1 个答案:

答案 0 :(得分:5)

在package.json文件中添加name属性。这样可以解决问题