SoloProject

Dongwoo Joo·2023년 5월 13일
0

codestates bootcamp

목록 보기
38/48

Error

Element type is invalid

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가 잘못 입력되었을때 발생한다.
  • 페이지에 들어가는 컴포넌트를 만들지 않고, App.js에서 렌더링했을 때 발생했다.

해결책

  • 파일이 모두 import 되었는지 확인
  • 파일의 경로와 이름을 확인
  • 코드가 작성되지 않은 컴포넌트 즉, 빈 페이지를 연결한 것인지 확인
profile
pursue nature

0개의 댓글