개인공부/React Native
[ReactNative] 의존성 문제 생겼을 때 해결
octopengj
2021. 3. 23. 19:52
리액트 네이티브를 사용하다 npm intall을 통해서 라이브러리등 기타 설치를 하다보면
인식을 제대로 못해서 오류가 나는 경우가 종종 있다.
이럴 때 node_module을 삭제하고 다시 설치하면 제대로 작동하는 경우가 있다.
아래와 같이 터미널에서 알려주대로
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
아래의 문장을 터미널에 작성해도 된다.
rm -rf node_modules && npm install