ReactNative | 오류

권영균·2021년 4월 20일
0

ReactNative Error

목록 보기
1/1

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-*

[해결방법]
1 단계 :$ npm cache clean --force

2 단계 :$ rm -rf node_modules 로 node_modules 삭제 폴더로 이동하거나 디렉토리로 이동하여 수동으로 삭제하고 마우스 오른쪽 버튼을 클릭 한 다음>삭제를 클릭하십시오.

3 단계 : npm install

다시 시작하려면 $ npm start

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

[해결방법]
App.js에서 return 안에서 해결함

profile
GRIT(Growth(성장), Resilience(회복력), Intrinsic Motivation(내재적 동기), Tenacity(끈기))를 중시하는 프론트엔드 개발자입니다.

1개의 댓글

comment-user-thumbnail
2021년 8월 2일

감사합니다!

답글 달기