Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native Error: Build input file cannot be found : /node_modules/react-native/ReactCommon/react/renderer/components/rncore/States.cpp

I am working on RN to build from Xcode 14.1 but it throws below error:

error: Build input file cannot be found: '/node_modules/react-native/ReactCommon/react/renderer/components/rncore/States.cpp'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'React-Fabric' from project 'Pods').

Using: "react-native": "0.72.3", "react": "^18.2.0"

Note: NewArchitecture is enabled in RN project. When I execute pod install then build is successful but in case of bundle install && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install. It is throwing above error.

like image 513
Luvnish Monga Avatar asked Sep 21 '26 11:09

Luvnish Monga


1 Answers

What works for me:

npx expo install --fix
cd iOS
pod install
like image 148
Matthew Gruman Avatar answered Sep 23 '26 08:09

Matthew Gruman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!