0

I have a react-native app I am creating, in which I am following a tutorial, and this app will not build any more. Since I added Redux (and I did this the day after the app was working perfectly), the app has been all over the place. I reverted code, I re-installed node modules. I even created a new project and brought over the code and ran npm install and yet nothing still will work. I even cleared build files via xcode and that didn't really help either.

The error I am getting is:

info Found Xcode project "rncourse_new.xcodeproj"
info Building (using "xcodebuild -project rncourse_new.xcodeproj -configuration Debug -scheme rncourse_new -destination id=E9C3D218-C3D5-4D9F-8931-0900B1C
DD86B -derivedDataPath build/rncourse_new")
.........
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app w
ith Xcode.app, by opening rncourse_new.xcodeproj. Run CLI with --verbose flag for more details.
User defaults from command line:
    IDEDerivedDataPathOverride = /Users/myusername/Desktop/SE_Things/Udemy/react-native/rncourse_new/ios/build/rncourse_new

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: Unable to resolve build file: XCBCore.BuildFile (missingTargetProductReference("3b72bb1ebc7660513872fe9a221d33fb29fe2a87b7c65fea7a8f025b04a3b7ff"))
 (in target 'rncourse_new')


** BUILD FAILED **


npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rn-course@0.1.0 ios: `react-native run-ios`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the rn-course@0.1.0 ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/myusername/.npm/_logs/2019-08-07T23_37_29_541Z-debug.log

Not sure where else to go with this, I even asked the owner of the tutorial and I am waiting for him to get back to me again (he originally told me to re-create the project and bring over his code which I did, and it didn't work).

Here is the link to my github repo: https://github.com/ThatDevOpNeal/react-native All that needs to be done is an npm install (do not run npm audit fix) and npm run ios or react-native run-ios.

thatdevop
  • 819
  • 2
  • 8
  • 19
  • Without code/link to the project it's hard to help but for "created a new project and brought over the code", make sure you don't copy the ios/android file as there might be some settings brought by the previous project in there. They will sync when you run `react-native run-ios` – Andus Aug 08 '19 at 02:47
  • @Andus I know the code is working cause this is from a Udemy course, so I've seen the code work. I can post it to Github and send you the link if necessary but I don't think it's a code issue (I copied over the instructor's code at this point). Yeah I didn't, the only thing I copied over were the `package.json`, `**.js`, and that's pretty much it. Whatever the instructor included, and then I ran an `npm install` and `react-native run-ios`. – thatdevop Aug 08 '19 at 04:32
  • Since you mentioned that the code has worked before, I guess it would be cache/installation issue, I would suggest you to clean the cache by `watchman watch-del-all && react-native start --reset-cache`, then go to xcode and clean the project, after that close everything and rebuild the project. – Andus Aug 08 '19 at 04:50
  • Also, you might want to try removing the `build` file in your ios folder, it will regenerate a new one when you run `react-native run-ios` – Andus Aug 08 '19 at 04:53
  • Lastly, this [link](https://stackoverflow.com/questions/50708012/error-unable-to-resolve-build-file-xcbcore-buildfile) might also help you – Andus Aug 08 '19 at 04:54
  • @Andus that last link is something i've done before, it fixed a problem way before. I just ran the `watchman watch-...` code and i'll try it again, i'll also clean the project and rebuild. thank you, i'll let you know how it turns out – thatdevop Aug 08 '19 at 05:07
  • @Andus this still didn't fix anything, not sure what to do? Created a new project, scratch, using `create-react-native-app testapp`, and selecting a _bare minimum setup_. I tried to run that and it didn't even run using `yarn ios` which is `react-native run-ios` – thatdevop Aug 08 '19 at 05:30
  • Sorry but without the code I am not able to do anything, maybe you can put the code in Github and publish the link in your question so that others can help you too – Andus Aug 08 '19 at 07:00
  • @Andus I've added the github link to the initial question, please take a look and see if it works for you? I'd really appreciate it! – thatdevop Aug 09 '19 at 01:11

1 Answers1

1

I just got this error message, and I try to delete ios/build directory and rebuild, but it still has error, so i have to create a new project, copy my old code. and it works.

I think when I delete node_modules, CocoaPods module not install. It is the absence of this package that causes this.

by the way, I am a Chinese, my english is not very will. Hope understanding.