๋ฆฌ์กํธ ๋ค์ดํฐ๋ธ - ํฐ๋ฏธ๋์์ expo ํ๋ก์ ํธ ์์ฑํ๊ธฐ
๐ฏ๋ชฉ์ :
expo ํ๋ก์ ํธ ์์ฑ ์ ๋น ๋ฅธ ์ธํ (expo dashboard ์ด์ฉํ์ง ์๊ณ ํฐ๋ฏธ๋ ์ด์ฉ ๊ฐ๋ฅ)
๐คข ์ค๋ฅ ํด๊ฒฐ :
- eas update:configure
Error: package.json is outside of the current git repository
1. ๊ณต์ ํํ์ด์ง ์ฐธ๊ณ ํ์ฌ RN ํ๋ก์ ํธ ์์ฑ
https://reactnative.dev/docs/environment-setup
Setting up the development environment · React Native
This page will help you install and build your first React Native app.
reactnative.dev
์ ๊ณต์ ๋ฌธ์๋ฅผ ์ฐธ๊ณ ํด๋ ์ข์ง๋ง ๊ฐ๋จํ ๋ช ๋ น์ด๋ ํฌ์คํ ์ ๋ณด๊ณ ๋ฐ๋ผํด๋ ๋ฌด๋ฐฉํ๋ค
ํฐ๋ฏธ๋์์ ๊ฒฝ๋ก๋ฅผ ํ์ธํ ํ
npx create-expo-app "ํ๋ก์ ํธ ์ด๋ฆ"
npm ์ ์ ๋ช ๋ น์ด
yarn create expo-app "ํ๋ก์ ํธ ์ด๋ฆ"
yarn ์ ์ ๋ช
๋ น์ด
๋์ค ์ฌ์ฉํ๋ ํจํค์ง ๋ฉ๋์ ์ ๋ช
๋ น์ด๋ฅผ ์ด์ฉํด ํ๋ก์ ํธ๋ฅผ ์์ฑํ๋ค!
2. eas update:configure
ํ๋ก์ ํธ ์์ฑ์ด ๋ค ๋์๋ค๋ฉด,
eas update:configure
๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๋ค,
์ด๋ eas update:configure ์ค๋ฅ๊ฐ ๋ฐ์ํ์ฌ ์๋ '์ค๋ฅ ํด๊ฒฐ' ๋ถ๋ถ์ ์์ฑํด ๋์๋ค!
์ด๋ ๋ค์ํ๋ฒ confirm ๋ฉ์ธ์ง๊ฐ ์ถ๋ ฅ ๋๋ฉด, Y๋ฅผ ์ ๋ ฅํด์ ์งํํ๋ฉด ๋๊ณ
๋ก๊ทธ์ธ์ ํ๋ผ๊ณ ์ถ๋ ฅ์ด ๋๋ค๋ฉด, ๋นํฉํ์ง ๋ง๊ณ expo ๊ณ์ ์ ๋ก๊ทธ์ธํด์ ์ฐ๋์ํค๋ฉด ๋๋ค
์ ์ ์๋์ ์ถ๋ ฅ ๋ฉ์ธ์ง๊ฐ ๋์๋ค๋ฉด expo์์ ๋ค์ ํ๋ฒ ํ์ธํด ๋ณด์
Expo
Expo is an open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.
expo.dev
๋ด๊ฐ ๋ง๋ 'RN-movie-app' ํ๋ก์ ํธ๊ฐ ์๋์ผ๋ก ์์ฑ๋์๋ค
3. eas update : ๋ฐฐํฌํ๊ธฐ
eas update
์ด์ update ๋ช ๋ น์ด๋ฅผ ํตํด
๋ฐฐํฌ๋ถํฐ ํด๋์
์ฌ๊ธฐ์ ๊ธฐ๋ณธ ๋ธ๋์น์ธ 'master' ๋ธ๋์น๋ฅผ ์์ฑํ๋ค๋ฉด ๋ฐ๋ก ์ํฐ๋ฅผ ๋๋ฅด๋ฉด ๋๋ค
์ปค๋ฐ ๋ฉ์ธ์ง๋ ๋ฌผ์ด๋ณด๋๋ฐ ์ค์ํ ๋ด์ฉ์ด ์์ผ๋, ์ํฐ๋ก ๋์ด๊ฐ์
์ด๋ฌํ ๋ฉ์ธ์ง๊ฐ ๋ฌ๋ค๋ฉด ์ ๋ฐฐํฌ๊ฐ ๋ ๊ฒ์ด๊ณ ,
์๋ Website link๋ก ๋ค์ด๊ฐ๋ณด์
๊ทธ๋ผ ์ด๋ ๊ฒ ํ๋ก์ ํธ ๋ฐฐํฌ๋ ๋งํฌ๊ฐ ๋์ค๊ณ
Preview ๋ฒํผ์ ๋๋ฌ ๋ด๊ฐ ๋ฐฐํฌํ ์ฃผ์์ expo QR code๊ฐ ๋์จ๋ค
4. ํ๋ก์ ํธ ๊ตฌ๋
์ด์ ๋ชจ๋ ์ค๋น๊ฐ ๋๋ฌ๋ค
npm start
npm ์ ์ ๋ ์ ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅํ๊ณ ,
yarn start
yarb ์ ์ ๋ ์ ๋ช ๋ น์ด๋ฅผ ํตํด ํ๋ก๊ทธ๋จ์ ๊ตฌ๋ ์ํจ๋ค!
์ด๋ ๊ฒ ๋น ๋ฅด๊ฒ RN ํ๋ก์ ํธ ์์ฑ๊ณผ, ๊ตฌ๋๊น์ง ํด๋ณด์๋ค
๊ฐํน window ์ ์ ์์ ๋ฐ์ํ๋ ์๋ฌ๋ฅผ ๊ฒช์๊ธฐ ๋๋ฌธ์,
๋ง์ฝ ํ๋ก์ ํธ ๊ตฌ๋ ํ, QR code ์ธ์ ์ค ์๋ฌ๊ฐ ๋ฐ์ํ๋ค๋ฉด
์๋ ํฌ์คํ ์ ์๋ฌ ํด๊ฒฐ ๋ถ๋ถ์ ์ฐธ๊ณ ํด ๋ณด์
+ ์ค๋ฅ ํด๊ฒฐ :
eas update:configure
Error: package.json is outside of the current git repository
eas update:configure ๋ช ๋ น์ด๋ฅผ ์ ๋ ฅ ํ ๋ค ์ด์ ๊ฐ์ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค๋ฉด
๊ฒฝ๋ก๋ฅผ ๋ค์ ํ์ธํด๋ณด์
๋ด๊ฐ ๋ง๋ ํ๋ก์ ํธ์์ ์์ด์ผ eas update๊ฐ ๊ฐ๋ฅํ๋ค!
์ต์ข ์ ๋ฆฌ
- npx create-expo-app, yarn create expo-app ๋ช ๋ น์ด๋ก RN ํ๋ก์ ํธ ์์ฑ
- ๊ฒฝ๋ก ์ค์ ํ, eas update:configure ๋ช ๋ น์ด๋ก ํ๋ก์ ํธ ์๋ ์์ฑ
- eas update๋ก ๋ฐฐํฌ
- npm start, yarn start๋ก ํ๋ก์ ํธ ๊ตฌ๋
- Error: package.json is outside of the current git repository ์๋ฌ๋ ๊ฒฝ๋ก ์ค์ ์ด ์๋ชป ๋์ด์ ๋ฐ์ํ๋ ๋ฌธ์