-
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 해결법React-native 2021. 8. 11. 23:58
ios 환경에서 사용하는 cocoaPad가 설치되지 않았다는 뜻이다.
(React Native 이기 때문에 ios 전용 라이브러리를 따로 설치해야한다)
그래서 시키는 대로 pod install을 했다.
Jeenie@JeeniecBookPro my-project % pod install [!] No `Podfile' found in the project directory.
분명 오타 하나 없이 명령어를 입력했는데도 Podfile을 찾을 수 없다고 나온다.
이 문제로 고민을 많이 했는데... 명령어를 입력하는 경로가 잘못됐다.
Jeenie@JeeniecBookPro my-project % cd ios Jeenie@JeeniecBookPro ios % pod install Pod installation complete! There are 44 dependencies from the Podfile and 47 total pods installed.
pod install로는 내 프로젝트 경로에서 Podfile 접근할 수 없다.
ios 폴더로 한칸 더 들어가서 pod install을 해야한다.
* 만약 프로젝트 경로에서 설치할 경우는 npx를 이용.
npx pod-install
* 여기서 다시 시뮬레이터를 돌릴 때는 꼭 프로젝트 파일 경로에서 npm run ios하기!
(또 왜안되지 왜안되지 하지말자)
잘 보면 에러 메시지에 모든 답이 다 들어있다. 다른 분들은 메시지만 보고 척척 알아내는데 나는 아직 에러 메시지가 너무 어렵다!
시뻘건게 뜨니까 조금 무섭기까지 하다
'React-native' 카테고리의 다른 글
StackNavigator (0) 2021.08.12 기타 (0) 2021.08.12 Animated.FlatList (0) 2021.08.11 react-native에서 가로 스크롤을 넣는 방법 (0) 2021.08.11 개발환경 설정 (0) 2021.08.09