Flutter

fatal error: module 'cloud firestore' not found 이슈

flutter developer 2024. 5. 24. 16:10

fatal error: module 'cloud firestore' not found

 

 

플러터 프로젝트의 배포/디버그 버전 분리를 한 뒤에 Xcode를 실행시키니 module 'cloud firestore' not found 가 나오며 런타임 에러가 발생했다. pod 인식에 무언가 문제가 생긴 것 처럼 보였다. 해결했던 방법은 아래와 같다.

 

 

먼저 플러터 프로젝트 안 iOS 폴더 터미널을 열어준다.

 

  1. pod cache clean --all
  2. pod deintegrate
  3. sudo gem install cocoapods-deintegrate cocoapods-clean
  4. sudo arch -x86_64 gem install ffi
  5. arch -x86_64 pod repo update
  6. arch -x86_64 pod install
 

위 커맨드 명령어를 순차적으로 입력한다. (작업시간이 소요되니 터미널 입력이후 아무것도 안나온다고 끄지말고 기다리자) 위 과정을 거쳤는데도 크래쉬가 난다면 모듈 버전을 확인해주어야한다.

 

 

팟파일에 들어가면 iOS 버전을 확인할 수 있다. 

이제 Xcode 프로젝트의 deployment target이 일치하는지 확인해주고 다르면 바꿔준다. 이때 프로젝트 타겟 디플로이먼트 뿐만 아니라 파이어베이스 디플로이먼트도 일치시켜준다.

 

이후부터는 정상적으로 프로젝트가 실행된다 ^^


https://stackoverflow.com/questions/64362285/flutter-on-ios-fatal-error-module-cloud-firestore-not-found

 

Flutter on IOS: fatal error: module 'cloud_firestore' not found

After searching long hours on github and stack for similar errors, none of the proposed solutions helped me to resolve this error. I tried quite a few things (a bit out of order): remove IOS derived

stackoverflow.com