Community

개발자 99% 커뮤니티에서 수다 떨어요!

← Go back
React-Native, React 18버전 dependency에러 문제
#react
2년 전
13,766
3

안녕하세요.

원하는 앱 만들고자 작지만 차근히 노력하고있는 수강생입니다.

바로 어제 'npx create-react-native 프로젝트명'을 실행시켰는데요.

문제1. 터미널 메트로 메세지가 osx의 터미널에서 실행됩니다. 이전엔 vscode의 터미널에서 보였는데요.

문제2. 스타일컴포넌트를 설치하는 과정에서 아래와 같은 에러메세지가 발생합니다.

npm ERR! code ERESOLVE

npm ERR! ERESOLVE unable to resolve dependency tree

npm ERR!

npm ERR! While resolving: [email protected]

npm ERR! Found: [email protected]

npm ERR! node_modules/react

npm ERR! react@"18.0.0" from the root project

npm ERR! peer react@">= 16.8.0" from [email protected]

npm ERR! node_modules/styled-components

npm ERR! styled-components@"*" from the root project

npm ERR!

npm ERR! Could not resolve dependency:

npm ERR! peer react@"^18.2.0" from [email protected]

npm ERR! node_modules/react-dom

npm ERR! peer react-dom@">= 16.8.0" from [email protected]

npm ERR! node_modules/styled-components

npm ERR! styled-components@"*" from the root project

npm ERR!

npm ERR! Fix the upstream dependency conflict, or retry

npm ERR! this command with --force, or --legacy-peer-deps

npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

npm ERR!

문제3. expo Ionicon 사용시 아래와 같은 곳에 문제가 있다고 합니다.

> 1 | import * as Font from "expo-font";

React 18과 다른 모듈간에 버전호환성 문제라 파악을 하고 있는데요.

해결방법이 있을까요?

환경은 osX / Intel mac 사용중입니다.

3 comments