아래 블로그에 정말 친절하게 작성되어있다. 이대로 따라가면 편하게 설치 가능하다
[React-Native] M1 arm64 react native 세팅(with. expo & React Native CLI)
M1 arm64 환경에서 리액트 네이티브 세팅하기 iOS, Android 모두 실행 가능 (Rosetta X)
qnrjs42.blog
npm run andriod
후 아래와 같은 애러가 발생한다면
Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager: "$ANDROID\_HOME/tools/bin/sdkmanager --licenses".
아래 한줄만 터미널에 입력해주자
$ yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses
npm run ios
후 아래와 같은 애러가 발생한다면
The following build commands failed: PhaseScriptExecution [CP-User]\ Generate\ Specs /...user/Developer/Xcode/DerivedData/app-fqangixwmexpoocqlryzliqmfghj/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-A5D15BFD2232DC7424A883B384E62144.sh (1 failure)
nvm으로 설치한 node와 yarn으로 설치한 node의 충돌 때문일 것이다
$ npm uninstall yarn
$ npm install -g yarn
한번 지워주고 전역으로 설치하면 정상 실행 가능할 것이다
참고링크
RN 설치
https://qnrjs42.blog/react-native/m1-arm64-setting
Andriod
https://www.kindacode.com/article/react-native-please-accept-all-necessary-android-sdk-licenses/
iOS
https://blog.smilecat.dev/posts/react-native-command-phase-script-execution-failed
'Study > Frontend' 카테고리의 다른 글
[React Native] ScrollView 스크롤 미작동시 (0) | 2022.01.05 |
---|---|
[React Native] React Native Project에 Expo Module 가져오기 (0) | 2021.11.21 |
redux (0) | 2021.04.17 |
axios (0) | 2021.04.17 |
useEffect (0) | 2021.04.17 |
Comment