[문제]
오랜만에 꺼내본 프로젝트에서 npm start 를 하니까 마주하게된
warn no apps connected. sending "reload" to all react native apps failed. make sure your app is running in the simulator or on a phone connected via usb.
npm start를 하거나 xcode에서 직접 실행시켰을 땐 정상적으로 빌드가 되지만, 위와 같은 오류가 발생했다. 나는 실제 기기로 연결하는 것도 아니고 시뮬레이터로 실행시키는데도 이러니까 너무 당황스러웠던 것이다 ...
그러다 xcode에서 run 하지말고 프로젝트 터미널에서 실행하자는 마음으로 react-native run-ios를 했더니 다음과 같은 오류가 났다 !!
error Cannot read properties of undefined (reading 'configurations').
TypeError: Cannot read properties of undefined (reading 'configurations')
...
react-native run-ios 혹은 react-native run-android 의 명령어를 쳐도 해당 오류가 뜨는 것이다 !!
그러다 결국 해결책을 발견
도움받은 블로그
https://velog.io/@jisang8255/RNCannot-read-properties-of-undefined-reading-configurations
RN_Cannot read properties of undefined (reading 'configurations').
예전에 만들었던 앱을 수정할 일이 있어서 열어보니react-native run-android 하니까Cannot read properties of undefined (reading 'configurations'). 요딴 에러가 떳다.스텍 오버플로우 도움!암튼 해결법은 프
velog.io
프로젝트/node_modules/@react-native-community/cli-platform-ios/build/config/index.js
에서
// 기존 코드 주석
//const configurations = userConfig.configurations || [];
// 대신 아래 코드 붙여넣기
let configurations="";
이게 답이었다 ㅜㅜ !!
ios가 문제엿던건데 android까지 막히는 이상한 현상 ... 알수가 없다
'JavaScript > React-native' 카테고리의 다른 글
[React-native] 투두리스트 만들기 (0) | 2023.09.12 |
---|---|
Error: Unsupported top level event type "onGestureHandlerStateChange" dispatched (0) | 2023.08.25 |
[!] Invalid `Podfile` file: undefined local variable or method `flags' for #<Pod::Podfile:0x000000011611b518>. (0) | 2023.06.29 |
[React Navigation] RNSScreenStackHeaderConfig was not found in the UIManager (0) | 2023.06.28 |
createStackNavigator (0) | 2023.06.28 |