Posts

Showing posts with the label React Native

React Native Android - react-native start 시 오류

error Invalid regular expression: /(.\fixtures.|node_modules[]react[]dist[].|website\node_modules.|heapCapture\bundle.js|.\tests.)$/: Unterminated character class. Run CLI with --verbose flag for more details. SyntaxError: Invalid regular expression: 요런 오류가 났다. 참나 난 시키는대로 잘 했는데 뭔 이런 오류가 나는거여.. 구글링으로 찾았다 방법~ 참조 :  https://stackoverflow.com/questions/58120990/how-to-resolve-the-error-on-react-native-start 프로젝트 폴더 내 \node_modules\metro-config\src\defaults 루트를 따라가면 blacklist.js 파일이 있다. 해당 파일을 켜서 내용을 바꿔준다. var sharedBlacklist = [ /node_modules[\/\\]react[\/\\]dist[\/\\].*/ , /website\/node_modules\/.*/ , /heapCapture\/bundle\.js/ , /.*\/__tests__\/.*/ ]; 고민 해결!

React Native Android - configuring project ':app' failed to find Build Tools revision 오류

리액트 네이티브로 앱만들기 해보는중 나는 오류 한번 없이 된적이 없다.. ADV 실행하고 cmd창에서 프로젝트 폴더로 이동. react-native start 하고 새로운 cmd창을 켜서 프로젝트 폴더로 이동한 후 react-native run-android 쳤는데!!! configuring project ':app' failed to find Build Tools revision 오류가 났다. sdk루트도 ANDROID-HOME 으로 설정해주었는데ㅠ 폭풍같은 구글링. 고치는 방법이 있었다. 참조 :  https://stackoverflow.com/questions/27620262/sdk-location-not-found-define-location-with-sdk-dir-in-the-local-properties-fil 프로젝트 폴더 내 android 폴더에 local.properties 파일을 만든다. (난 vs code로 폴더 열어서 생성했다.) 파일에 sdk.dir =C\:\\Users\\Jjung\\AppData\\Local\\Android\\Sdk 입력 후 저장하고 cmd창에 다시 react-native run-android 하니까 됐다~~!! 재밌다 헤헤