mac, zsh
react-native-cli: 2.0.1
react-native: 0.59.8
npm 6.9.0
expo: 3.0.9
I just create a project by expo using expo-template-blank-typescript
and right then upgrade
expo init MyProject
cd MyProject
react-native upgrade
info No version passed. Fetching latest...
info Fetching diff between v0.59.8 and v0.60.4...
error Cannot read property 'toLowerCase' of undefined
debug TypeError: Cannot read property 'toLowerCase' of undefined
at getPatch (/Users/asdf/MyProject/node_modules/@react-native-community/cli/build/commands/upgrade/upgrade.js:109:121)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Object.upgrade [as func] (/Users/asdf/MyProject/node_modules/@react-native-community/cli/build/commands/upgrade/upgrade.js:238:17)
I am having this same issue, I am trying to work with a component that requires react-native to be 0.60.4 or greater and my project is 0.59, but I cannot upgrade because of this error
I take it that you haven't ejected?
Upgrading Expo projects works a bit differently and latest SDK version supports RN 0.59.8, so your best bet is to wait for the next SDK version which is planned for September, I think.
If you have ejected, you're probably missing name field in package.json.
@maciejsimka Thanks. I will keep the 0.59.8 and wait until Sep.
I am going to close this issue because the code responsible for this failure is no longer part of the CLI.
toLowerCase() has been removed (and likely other logic has been changed).
Most helpful comment
I take it that you haven't ejected?
Upgrading Expo projects works a bit differently and latest SDK version supports RN 0.59.8, so your best bet is to wait for the next SDK version which is planned for September, I think.
If you have ejected, you're probably missing
namefield inpackage.json.