# React Native 컨테이너가 실행이 안 돼요

아래 순서대로 터미널에 입력해주세요.

### 노드 버전 업

```sh
rm -rf /usr/lib/node_modules
rm -rf /usr/bin/node
rm -rf /usr/include/node
rm -rf /usr/local/bin/node
rm -rf /usr/local/include/node
rm -rf /usr/share/man/man1/node*
rm -rf /usr/local/lib/node_modules/
rm -rf /usr/local/bin/npm
rm -rf ~/.npm
rm -rf ~/.node-gyp
apt remove nodejs -y

curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

```

### 터미널 새로고침

<figure><img src="/files/Zm2steGUiNQHiEb7fRfy" alt=""><figcaption></figcaption></figure>

터미널 옆 새로고침 버튼을 눌러 터미널을 새로고침합니다.

### package.json 파일 수정

`{{이곳에 PORT 번호를 넣어주세요}}` 부분을 **상단 메뉴 \[컨테이너]** → **\[포트포워딩 설정]의 내부 포트 19000에 해당하는 외부 포트의 값**으로 수정합니다.

```json
{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start --port {{이곳에 PORT 번호를 넣어주세요}}",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "expo": "~48.0.10",
    "expo-status-bar": "~1.4.4",
    "react": "18.2.0",
    "react-native": "0.71.6",
    "react-native-web": "~0.18.10",
    "react-dom": "18.2.0",
    "@expo/webpack-config": "^18.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

```

### node\_modules 설치

```sh
npm i

npx expo install react-native-web@~0.18.10 react-dom@18.2.0 @expo/webpack-config@^18.0.1

```

### React Native 기본 명령어로 실행

<figure><img src="/files/P1rOV84HahQvKcveuXmB" alt=""><figcaption></figcaption></figure>

우측 상단의 실행 버튼을 눌러 실행합니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.goorm.io/ko/goormide/07.-faq/react-native.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
