react-native-screens 버전 호환 문제
156
1 câu hỏi đã được viết
버전 호환 문제
현재 강의 흐름대로 react-native 0.79.4 버전을 깔고 이 강의에서 npm install @react-navigation/native
과npm install react-native-screens react-native-safe-area-context
를 그대로 실행해서 설치하면
npx pod-install ios Need to install the following packages: pod-install@1.0.9 Ok to proceed? (y) y 🔍️ Scanning for pods... 1.16.2 > pod install Found 2 modules for target mapzip2 link_native_modules! {:ios_packages=>[{:configurations=>[], :name=>"react-native-safe-area-context", :root=>"/Users/kwakori/projects/react-native/learning/mapzip2/node_modules/react-native-safe-area-context", :path=>"../node_modules/react-native-safe-area-context", :podspec_path=>"/Users/kwakori/projects/react-native/learning/mapzip2/node_modules/react-native-safe-area-context/react-native-safe-area-context.podspec", :script_phases=>[]}, {:configurations=>[], :name=>"react-native-screens", :root=>"/Users/kwakori/projects/react-native/learning/mapzip2/node_modules/react-native-screens", :path=>"../node_modules/react-native-screens", :podspec_path=>"/Users/kwakori/projects/react-native/learning/mapzip2/node_modules/react-native-screens/RNScreens.podspec", :script_phases=>[]}], :ios_project_root_path=>"/Users/kwakori/projects/react-native/learning/mapzip2/ios", :react_native_path=>"../node_modules/react-native"} Auto-linking React Native modules for target mapzip2: RNScreens and react-native-safe-area-context Framework build type is static library Configuring the target with the New Architecture [!] Invalid Podfile file: [!] /opt/homebrew/bin/node ./../node_modules/react-native/scripts/generate-codegen-artifacts.js -p /Users/kwakori/projects/react-native/learning/mapzip2/ios/.. -o /Users/kwakori/projects/react-native/learning/mapzip2/ios -t ios [Codegen] Analyzing /Users/kwakori/projects/react-native/learning/mapzip2/package.json [Codegen] Searching for codegen-enabled libraries in the app. [Codegen] The "codegenConfig" field is not defined in package.json. Assuming there is nothing to generate at the app level. [Codegen] Searching for codegen-enabled libraries in the project dependencies. [Codegen] Found react-native [Codegen] Found react-native-safe-area-context [Codegen] Found react-native-screens [Codegen] Searching for codegen-enabled libraries in react-native.config.js [Codegen] Processing FBReactNativeSpec [Codegen] Searching for podspec in the project dependencies. [Codegen] Processing rncore [Codegen] Searching for podspec in the project dependencies. [Codegen] Processing safeareacontext [Codegen] Searching for podspec in the project dependencies. [Codegen] Supported Apple platforms: ios, macos, tvos, visionos for safeareacontext [Codegen] Processing rnscreens [Codegen] Searching for podspec in the project dependencies. [Codegen] Supported Apple platforms: ios, tvos, visionos for rnscreens [Codegen] Error: Unknown prop type for "environment": "undefined" [Codegen] Done. . # from /Users/kwakori/projects/react-native/learning/mapzip2/ios/Podfile:20 # ------------------------------------------- # > use_react_native!( # :path => config[:reactNativePath], # ------------------------------------------- Couldn't install Pods. Updating the Pods project and trying again...와 같은 에러가 발생합니다.
아무래도 버전 호환성 문제인 것 같습니다.
https://github.com/software-mansion/react-native-screens/blob/main/README.md#support-for-fabric
위 문서를 참고하면 react-native-screens의 최신 버전인 4.19.0+ 는 react-native 0.81.0+ 에서만 호환된다고 하는 것 같습니다. 강의 들으시는 분들은 참고해주세요.
버전을 낮춰서 설치하시거나 하시면 정상적으로 설치되더라구요
//
아니면 혹시 그냥 react-native를 0.81.0+ 로 설치해서 강의를 들어도 문제없으려나요?
Câu trả lời 1
0
안녕하세요, 인프런 AI 인턴입니다.
재훈님, 강의에서 겪고 있는 버전 호환 문제에 대해 도움을 드리겠습니다.
현재 상황에서 두 가지 옵션이 있습니다:
리액트 네이티브와 관련된 라이브러리들의 버전 호환성을 맞추기 위해 react-native-screens의 버전을 react-native 0.79.4에 맞추어 이전 버전으로 설치하는 방법입니다. 예를 들어,
npm install react-native-screens@4.18.1같은 명령어로 버전을 명시하여 설치해 보시는 것이 좋습니다.반대로 react-native의 버전을 0.81.0+로 올려 최신의 react-native-screens 버전을 사용할 수 있도록 하는 방법입니다. 하지만 이 경우 강의 내용과 호환되지 않을 수 있는 부분이 생길 수 있어서 이후 코딩한 내용이나 UI 변경 등을 확인하며 따라가야 할 필요가 있습니다.
강의 진행 중이라면, 첫 번째 방법(라이브러리 버전 조정)을 추천드립니다. 이미 프로젝트가 잘 진행되고 있고, 강의에 설명된 기능이 최신 버전에 충분히 적용된다면 두 번째 방법(react-native 업데이트)도 고려해보실 수 있습니다.
추가적으로 독립적인 소스 참고 링크를 확인하여 현재 사용하고 있는 라이브러리의 버전 호환 정보를 꼭 검토하길 고지드립니다.
문제가 잘 해결되시길 바랍니다. 더 궁금한 사항이 있으면 언제든지 연락 주세요.
안드로이드 실행 중 Drawer네비게이션과 MapView 성능 문제
0
104
2
해당 강의 부분은 실제 활용하기에 부족해 제가 해결한 방법입니다.
0
97
1
소스코드가 강의 순서랑 다른가요?
0
74
2
현재 Windows에서 VsCode로 작업 중인데 추후에 IOS도 가능하게 하려면
0
116
2
react-native-fast-image는 react 19 버전에서 설치가 안되나요?
0
209
2
SQL Shell의 역할이 무엇인가요?
0
92
1
혹시 해당 강의에서invalidateQueries를 사용한 이유가 있을까요?
0
79
2
빠르게 실행해보고싶습니다.
0
84
1
강의 수강 순서 관련
0
72
1
애뮬레이터 실행 방법
0
101
2
무료 Apple ID로 실기기 테스트 가능한가요?
0
92
2
ios 실기기 연결
0
70
2
npm run ios에러
0
76
1
10월 삭제 예정인 강의는 이유를 알 수 있을까요?
0
102
1
캘린더 개발 후에 navigation 에 대해서 궁금한 점이 있습니다.
0
52
1
안드로이드 위치 권한 이슈 2가지 문의
0
72
1
지도가 보이려면 음.. 작성해주신 스타일과 다르게
0
75
0
제대로 설치한거같은데 안드로이드랑 ios 둘다 앱실행이 안되는것같아요
0
83
3
강의 내용을 보면 전체적으로 function 함수 키워드를 사용하시는데
0
70
2
강의 3-9 에서 useGetRefreshToken 훅 안에 즉시 함수로 처리하는 이유가 궁금합니다!
0
83
2
사내에서 figma.com 업로드 안되나요?
0
97
1
AWS EC2 + RDS 설정
0
86
2
안드로이드 안켜집니다.
0
92
2
ios 배포 - Distribute App 에러
0
269
1

