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.

"Could not determine react-native-codegen location" after upgrading to 0.65

See original GitHub issue

Please 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.

  1. Have React Native 0.64.x project.
  2. Upgrade your dependencies to 0.65.
  3. Install/update via yarn and CocoaPods.
  4. Try to build.

Expected Results

Project should build normally.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14

github_iconTop GitHub Comments

7reactions
canpoyrazoglucommented, Aug 18, 2021

I’ve found out installing react-native-codegen as a dev dependency fixes the issue:

yarn add --dev react-native-codegen

But again, I think it should be subdependency of React Native and be installed by that instead of needing a manual install.

1reaction
milobobcommented, Aug 7, 2022

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!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xcode 12.4 React native build failed in IOS Showing All ...
After trying all solutions I followed a solution moving the folder to a ... if [ -z "$NODE_BINARY" ]; then echo "Error: Could...
Read more >
react-native-codegen - npm
To run the tests in this package, run the following commands from the react Native root folder: yarn to install the dependencies. You...
Read more >
Upgrading to new versions - React Native
Upgrading to new versions of React Native will give you access to more APIs, views, developer tools and other goodies. Upgrading requires a ......
Read more >
React Native Upgrade Helper
Check out Upgrade Support if you are experiencing issues related to React ... When upgrading, you should replace them with your actual project's...
Read more >
React Native monorepo for every platform: Android & iOS
Now that the monorepo foundation is in place, we can start building our app. ... Then, update the generated package.json by setting the...
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