본문 바로가기
개발이야기/React

[React] Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

by hyung12 2022. 9. 30.
반응형

 

Server Error

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

 


 

 

\*.tsx 파일은 \*.ts 로 변경하면서 생긴 에러...

 

또는 import 할 때 { \*\*\* } 때문일 수도 있으니 import 할 때도 주의깊게 확인할 것!

 

 


 

[정리]

해당 에러는 components 이름 또는 import path가 잘못되었을 때 발생하는 에러

반응형