320x100
320x100

Watchman 

: 특정한 디렉터리나 파일이 변경되면 지정한 동작을 실행할 수 있게 하는 프로그램

: RN의 디버그 모드에서 소스코드가 변경될때마다 다시 컴파일하여 화면에 표시해주는 역할  

 

ㆍ윈도우 OS버전 다운로드

: https://github.com/facebook/watchman/releases/tag/v2021.09.20.00

: Sourcecod.zip 을 특정 폴더에 저장한 뒤 해당 폴더를 환경 변수에 등록

 

ㆍ그외 OS

: https://facebook.github.io/watchman/docs/install.html

 

ㆍ사용법

: VS Code 콘솔창에 watchman watch-del-all 

 (리액트 네이티브 컴파일러 캐시 삭제)

: rm -rf node_modules/

 

 

 

 

리액트 네이티브 캐시 삭제

: C:\\Users\\사용자\\.gradle\\cache 내부의 폴더 삭제

 

 

 

npm 캐시 삭제

: npm cache clean --force
: npm install
: npm start -- --reset-cache
: npx react-native run-android

 

 

 

gradlew 클리어

: cd android
: ./gradlew clean
: ./gradlew app:assembleRelease --stacktrace

 

 

 

Unable to load script. Make sure youre dither running a Metro server...

: 패키지명/android/app/src/main/assets 폴더가 있는지 확인 후 없으면 생성

: 패키지명/android 폴더에서 ./gradlew clean 명령어 실행

: 패키지명 폴더에서 아래 명령어 실행 후 react-native run android 실행

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

 

 

 

파이어베이스 function 클리어

npx eslint --fix functions/index.js
firebase deploy --only functions  

 

 

 

npm 모듈 클리어

watchman watch-del-all
rm -rf $TMPDIR/react-native-packager-cache-*
rm -rf $TMPDIR/metro-bundler-cache-*
rm -rf node_modules/
npm cache clean
npm install
npm start --reset-cache

 

 

 

 

 

 

Refference

 

[react-native] 오류 : Unable to load script. Make sure youre dither running a Metro server...

react-native 최초 설치 후 안드로이드 스튜디오로 실행할 경우 위와 같은 오류 발생할때 1. [패키지명]/android/app/src/main/assets 폴더가 있는지 확인하고 없으면 생성 2. [패키지명]/android 폴더에서..

dlevelb.tistory.com

 

npm 모듈 clear

watchman watch-del-all rm -rf $TMPDIR/react-native-packager-cache-* rm -rf $TMPDIR/metro-bundler-cache-* rm -rf node_modules/ npm cache clean npm install npm start -- --reset-cache

lemny.tistory.com

 

300x250
728x90