본문 바로가기
ReactNative

[React Native]error Failed to build iOS project. "xcodebuild" exited with error code '65'.

by pocket.dev 2024. 5. 16.
반응형

 

 

npm run ios 명령어 실행 후 다음 에러를 마주했다.

error Failed to build iOS project. "xcodebuild" exited with error code '65'.
To debug build logs further, consider building your app with Xcode.app, by opening '.xcworkspace'.

시도 1번

  1. DerivedData 폴더 확인
    xcode 실행 -> settings -> Locations -> DerivedData에서 폴더 위치 확인 가능
    또는
    /Users/{user_name}/Library/Developer/Xcode/DerivedData 위치에 폴더 존재 확인 가능
  2. 폴더 삭제
    (중요) Xcode 닫은 후에 DerivedData 폴더 삭제
    (* Xcode를 닫지 않으면 DerivedData 폴더가 남아있게 된다.)
  3. 휴지통에 있는 DerivedData 폴더도 삭제
  4. 다시 Xcode를 실행 시켜서 Derived 폴더가 다시 제대로 생성됐는지 확인
  5. npm run ios로 프로젝트 구동

→ 이 방법으로는 안됐다.

시도 2번

  1. 시도 1번과 마찬가지로 DerivedData 폴더 제거 후 휴지통에서도 깔끔하게 제거
  2. 프로젝트 폴더로 진입 후 아래 명령어 순차적으로 수행
cd ./ios
pod cache clean --all
pod install
cd ../
npx react-native run-ios

→ 이 방법으로 프로젝트 구동 성공