react-native init project를 했는데 오류가 발생했습니다.
found 0 vulnerabilities C:\Users\minyoung\AppData\Roaming\npm\node_modules\react-native-cli\index.js:302 cli.init(root, projectName);
cli.init이 없다는 내용이었는데, 검색해보니 옛날 버전이거나, 너무 최신버전의 오류일 수 있다고 합니다.
react-native를 모두 삭제하고 다시 설치하는 방식으로 해결했습니다.
저는 npm을 사용하고 있기에 다음을 입력했습니다. npx를 사용하면 npx로만 바꿔서 입력하면 된다고 합니다.
npm uninstall react-native-cli
npm uninstall react-native
yarn을 사용하는 경우는 다음을 사용하면 된다고 합니다.
yarn global remove react-native-cli react-native
삭제 후, 다시 설치
npm install react-native-cli
npm install react-native
프로젝트를 생성해줬습니다.
react-native init projectName
시간이 조금 지난 후 생성이 되었습니다.
RN은 프로젝트 이름입니다.