본문 바로가기

React19

[React 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.. 문제 상황 styled components 작성 후 실행하려는데 에러가 났다. 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. 요소 타입이 유효하지 않다고 한다. 아마도 오타가 있거나 빼먹고 만들어주지 않은 태그가 있는 듯하다. 해결 태그명이 안맞았던 .. 2022. 1. 14.
[React Error] error - Error: input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`. 문제 상황 styled component로 열심히 emotion 태그를 만들었는데 갑자기 아래와 같은 에러가 발생하면서 실행이 되지 않았다. # 터미널의 에러문구 error - Error: input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`. # 브라우저 상 에러문구 Server Error Error: input is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`. This error happened while generating the page. Any console logs wi.. 2022. 1. 14.
[React Error] Module not found: Can't resolve 문제 상황 UI 과제를 하다 에러를 만났다. 브라우저에서의 에러문구는 다음과 같다. ./pages/boards/new/index.js:1:0 Module not found: Can't resolve '../../../../styles/boardEmotion' > 1 | import { 2 | Wrapper, 3 | Create, 4 | Register, https://nextjs.org/docs/messages/module-not-found 경로를 읽어오지 못하고 있다. 해결 방법 1. 경로를 맞게 설정해줬는지 확인 '../../../../styles/boardEmotion' 가 아니라 '../../../styles/boardEmotion' 였다..ㅎㅎ 그러나 나의 경우 아래 해결법도 필요했다. 2. n.. 2022. 1. 12.