expected a string or class/function 리액트 에러

그루트·2022년 3월 31일
0

ERROR I FACED

목록 보기
2/3

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

원인 : components의 이름이 잘못되었거나, import path가 잘못 입력되었을때 발생한다. 페이지에 들어가는 컴포넌트를 export default 하지않고, 메인페이지에서 렌더시켰더니 발생했다.

해결책 : 임포트된 파일의 경로와 이름을 하나하나 확인하기, 혹시 함수가 만들어지지않은 빈페이지를 연결한건 아닌지 export default를 작성하지 않았는지 확인하기

profile
i'm groot

0개의 댓글