Upgrading to 0.67.2 failed to build
See original GitHub issueNew Version
0.67.2
Old Version
0.66.4
Build Target(s)
android simulator
Output of react-native info
❯ npx react-native info info Fetching system and libraries information… System: OS: macOS 12.1 CPU: (16) x64 Intel® Core™ i9-9980HK CPU @ 2.40GHz Memory: 24.41 MB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node Yarn: Not Found npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm Watchman: 2022.01.31.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /var/folders/f8/nhj6gdrx6c557yr942xcs1xh0000gn/T/frum_21795_1644870251479/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 28, 29, 30 Build Tools: 29.0.2, 29.0.3, 30.0.2 System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom_64, android-30 | Google Play Intel x86 Atom Android NDK: 22.1.7171670 IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7784292 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 11.0.11 - /Users/wirianto/.sdkman/candidates/java/current/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.2 => 0.67.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Issue and Reproduction Steps
Upgrading to 0.67.2 from 0.66.4 failed to build for Android, but fine for iOS.
To reproduce:
- Create new react-native project with
npx react-native init TestUpgrade --version 0.66.4 --template react-native-template-typescript - Go into the project folder -
cd TestUpgrade - Check the package.json file to ensure it is having
react-native@0.66.4. If not, downgrade bynpm I --save react-native@0.66.4 - Build and run the project -
npm run android - Once the project run successfully, close the emulator and metro.
- Upgrade to react-native@0.67.2 -
npx react-native upgrade - Resolve any merge conflict
- Reinstall dependencies -
npm i - Run the project again -
npm run android. The app will failed with message regarding DatePickerAndroid.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6

Top Related StackOverflow Question
After some head banging I managed to overcome this
First use the upgrade helper website to manually upgrade (adding/removing/modifying files as necessary), I went from 0.66.4 to 0.67.4: https://react-native-community.github.io/upgrade-helper/?from=0.66.4&to=0.67.4
NB: you shouldn’t need to make any changes to the project.pbxproj file, it just regenerates ids and jiggles things around for no apparent reason, and never normally needs touching:
Next if you are using android, do your npm install, and then go into the android directory and run “gradlew.bat clean” and the next run of “npx react-native run-android” should succeed
If you are using iOS however, it’s a little bit more of a pain, I think it holds onto something that it can’t let go of even if you do a clean in XCode, so check in all your changes, and push them to your remote repo, and then check them out afresh in a new path, run “npm install”, “npx react-native link” (should be unnecessary but did get a “have you run link” message without), and finally a “pod install”, running “npx react-native run-ios” should now work!!
This is not the first time the upgrade command has failed me, it is a waste if time!
This issue was closed because it has been stalled for 7 days with no activity.