"Could not determine react-native-codegen location" after upgrading to 0.65
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
After an upgrade from 0.64.x to 0.65 I get:
Error: Could not determine react-native-codegen location. Try running 'yarn install' or 'npm install' in your project root.
Command PhaseScriptExecution failed with a nonzero exit code.
I confirm this is the case after a complete purge of node_modules, yarn.lock, Pods, Podfile.lock, Xcode build folder, and a fresh install/build too.
React Native version:
System: OS: macOS 11.3.1 CPU: (16) x64 Intel® Core™ i9-9980HK CPU @ 2.40GHz Memory: 27.26 GB / 64.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.2 - /usr/local/bin/node Yarn: 1.22.5 - /usr/local/bin/yarn npm: 6.14.13 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4 Android SDK: Android NDK: 17.2.4988734 IDEs: Android Studio: 4.1 AI-201.8743.12.41.6858069 Xcode: 12.5/12E262 - /usr/bin/xcodebuild Languages: Java: 10.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: ^17.0.2 => 17.0.2 react-native: ^0.65.0 => 0.65.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Have React Native 0.64.x project.
- Upgrade your dependencies to 0.65.
- Install/update via yarn and CocoaPods.
- Try to build.
Expected Results
Project should build normally.
Issue Analytics
- State:
- Created 2 years ago
- Comments:14
Top GitHub Comments
I’ve found out installing react-native-codegen as a dev dependency fixes the issue:
But again, I think it should be subdependency of React Native and be installed by that instead of needing a manual install.
OMG. Ok it was react-native-codegen. I was using version 0.0.7 and when I upgraded to a newer one, it caused the error. I installed old version using ‘npm install react-native-codegen@0.0.7 -save-dev’ and that fixed the problem. Hopefully you don’t lose another 5 years on this issue!!