🧩Javascript/react-native

[ReactNative]TypeScript 템플릿 프로젝트 cli 에러

DevJiun 2022. 2. 28. 22:58

RN 프로젝트를 타입스크립트로 프로젝트를 생성하려고

 

npx react-native init LearnType --template react-native-template-typescript

해당 명령어를 입력하면

 

잘 되는것 같다가

 

error An unexpected error occurred: "https://registry.yarnpkg.com/react-native-template-react-native-template-typescript: Not found".

이런 에러가 나는데요

 

rn cli 개발은 이미 커뮤니티로 넘어가서 그렇다고 합니다.

 

npm uninstall -g react-native-cli

기존 cli는 지워주시구요

 

npm i -g @react-native-community/cli

커뮤니티로 재설치후 다시 명령어를 입력하면

 

 

성공!

 

참고링크 https://stackoverflow.com/questions/58078702/error-an-unexpected-error-occurred-https-registry-yarnpkg-com-react-native-t/58079073