본문 바로가기
프로그래밍언어/React Native

React_Native_CLI 01

by kage2k 2021. 12. 26.
728x90
반응형

React_Native_CLI

INSTALL AND CREATE FIRST APP

  1. node
    • nodejs.org 에서 다운로드 설치
    • Homebrew brew install node
    • 설치 버전 확인은 Terminal 에서 node -v
  2. React_Native_CLI
  3. Extention in VSCODE
    • React Native Tools
    • React-Native/React/Redux snippets for es
    • prettier
    • material icon theme
    • ESLint (eslint.org/docs/rules)
      • How to edit .eslintrc.js
        add comment Ex)
      • module.exports = {
          root: true,
          extends: [
            '@react-native-community',
            'eslint:recommended',
            'plugin:prettier/recommended',
          ],
          rules: {
            'no-console': 1,
          },
          'prettier/prettier': [
            'error',
            {
              endOfLine: 'auto',
            },
          ],
        };
  1. Create App
    • terminal(CMD+J)에서 npx react-native init YourWantName
    • github.com/new git 생성
    • open project in VSCODE
      • git init in Terminal
      • git remote add origin https://address.git
      • touch README.md and Edit README.md
      • git add .
      • git commit -m "1.0 init commit"
      • git push origin main
    1. Run (ios Simulator)

Errors Fix

npm install --global error

npm bin -g find your global path,
in my case, /usr/local/bin

vi ~/.zshrc 을 사용해서 edit 해줍니다.

export PATH=${PATH}:/Users/global path 마지막 줄에 추가하였습니다.

ESC 를 하고 :WQ저장하고 터미널에서 source ~/.zshrc

npm install error

brew install npm

Type annotations can only be used in TypeScript files error

settings.json add a comment as below

"typescript.validate.enable": false,
"javascript.validate.enable": false,
300x250
반응형

'프로그래밍언어 > React Native' 카테고리의 다른 글

[vscode] code 명령으로 vscode 열기  (0) 2021.12.25