일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- unable to resolve module
- 라이브러리 커스텀
- 안드로이드
- baseurl 오류
- 하우스플리퍼
- Graveyard Keeper
- removeClippedSubviews
- 하우스플리퍼인테리어
- patch package
- 리액트네이티브 hooks
- RecyclerView
- onScrollToIndexFailed
- react
- react native hooks
- 헤르메스 엔진
- react native lodash
- 리액트네이티브
- Android
- React Native
- privacy manifest
- 리액트 네이티브 헤르메스
- react native privacy manifest
- Kotlin
- 스팀게임추천
- 리액트네이티브 라이브러리 커스텀
- tsconfig baseurl
- ReactNative
- 리액트 네이티브 ios
- react native hook
- hermes engine
Archives
- Today
- Total
숨참고 개발다이브
[React Native/RN] 프로젝트 생성 시 android, ios 폴더 안보임 문제(feat. TypeError: cli.init is 본문
개발/React & React Native
[React Native/RN] 프로젝트 생성 시 android, ios 폴더 안보임 문제(feat. TypeError: cli.init is
사라 Sarah 2022. 10. 4. 13:33728x90
오랜만에 RN 프로젝트를 생성했더니 갑자기 android, ios 폴더 및 기타 주요 파일들이 생성되지 않았다.
오류 메시지는 다음과 같았다.
TypeError: cli.init is not a function
검색해보니 stackoverflow에서는 폴더를 재생성할때 eject를 사용하라는 답변이 가장 많았다.
react-native eject
react-native link
하지만 내 프로젝트에서는 먹히지 않는 상황이었다.
해결방법
eject 동작 안되는 현상으로 다시 검색해보니 react-native 와 react-native-cli를 재설치하라는 답변을 발견했다.
yarn global remove react-native
yarn global remove react-native-cli
yarn global add react-native
yarn global add react-native-cli
이후 혹시나 모른 버전 이슈때문에 프로젝트의 react-native 버전도 낮추어 다시 프로젝트를 생성했다.
npx react-native init YourProjectName --version 0.68.2
이 두가지를 모두 진행하니 정상적으로 파일과 폴더들이 생성되는 걸 확인할 수 있었다.
참조
https://stackoverflow.com/questions/72768245/typeerror-cli-init-is-not-a-function-for-react-native
300x250
'개발 > React & React Native' 카테고리의 다른 글
Comments