React Native

[React Native] npx react-native run-ios 에러

지니지니하지니 2023. 5. 19. 17:03
** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/hazzing/Library/Developer/Xcode/DerivedData/choikangreview-bedwjgsdwlexvghbdldkmninbxjd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E00014D80.sh (in target 'FBReactNativeSpec' from project 'Pods')
(1 failure)

어마무시하게 삽질을 하게 만든 에러.. ㅠㅠㅠ 진짜 하루를 다 쓰고

 

1. yarn과 npm의 충돌 문제

yarn 을 삭제 후 nvm버전을 임의로 지정(이전에 설치했던 버전이 16.15.1 이라 해당 버전 사용)

brew uninstall --force yarn
nvm use 16.15.1
nvm alias default 16.15.1

 

 

새롭게 프로젝트를 생성하고, 해당 프로젝트로 디렉토리 이동 후 npx react-native run-ios 실행

npx react-native init 프로젝트명

 

아래와 같은 에러가 발생한다면 

error No simulator available with name "iPhone 13".

 

특정 버전을 지정 후 실행해주면 됩니다.

아니면 xcode 에서 window -> Devices and Simulators 에서 13을 추가해주면 됩니당

npx react-native run-ios --simulator='iPhone 14'