question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrading to 0.67.2 failed to build

See original GitHub issue

New 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:

  1. Create new react-native project with npx react-native init TestUpgrade --version 0.66.4 --template react-native-template-typescript
  2. Go into the project folder - cd TestUpgrade
  3. Check the package.json file to ensure it is having react-native@0.66.4. If not, downgrade by npm I --save react-native@0.66.4
  4. Build and run the project - npm run android
  5. Once the project run successfully, close the emulator and metro.
  6. Upgrade to react-native@0.67.2 - npx react-native upgrade
  7. Resolve any merge conflict
  8. Reinstall dependencies - npm i
  9. Run the project again - npm run android. The app will failed with message regarding DatePickerAndroid. Screen Shot 2022-02-15 at 9 13 21 AM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
dysfunctional-appscommented, May 3, 2022

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!

0reactions
github-actions[bot]commented, Nov 8, 2022

This issue was closed because it has been stalled for 7 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Upgrade Helper
When upgrading, you should replace them with your actual project's name. You can also provide your app name by clicking the settings icon...
Read more >
Upgrading to React Native 0.67 - YouTube
Let's upgrade Ignite's boilerplate to the latest React Native!
Read more >
Troubleshooting - React Native
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here, ......
Read more >
The following build commands failed: SwiftCompile normal ...
0", "react-native": "0.67.2", ... Update. After famfamfam's Comment I tried building with Xcode (Until now I tried using the integrated terminal ...
Read more >
Troubleshooting for React Native | Sentry Documentation
Please update to this version or a later one. ... iOS Build Script Failed ... If your build fails due to Sentry CLI...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found