본문 바로가기

React/React Error6

[React Error] is assigned a value but never used. 'UPLOAD_FILE'이(가) 선언은 되었지만 해당 값이 읽히지는 않았습니다. . . . export export export export.....!!! 2022. 2. 8.
[React Error] error - 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.. 오늘도 어김없이 에러가 났다. 에러문구는 다음과 같다. error - 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. export 또는 import를 안해줬거나 default를 빼먹은 모양인데 광활한 컴포넌트들 속에서 하나하나 찾아봤다. 나의 경우는 페이지네이션 하려고 컴포넌트 빼.. 2022. 2. 8.
[React Error] Parsing error: Cannot find module 'next/babel' 문제 같은 워크스페이스 내에 다른 프로젝트에서 타입스크립트와 codegen을 깔고 나서 또 다른 프로젝트에서 갑자기 Parsing error: Cannot find module 'next/babel' 이런 에러가 나면서 import가 안받아지면서 코드가 작동이 되지 않았다. 같은 워크스페이스 내에서 또 다른 프로젝트를 새로 만들어도 다른 워크스페이스를 파서 새로 해봐도 같은 에러가 나면서 에러가 떴다. 해결 에러가 나는 프로젝트에 eslint 깔고 .eslintrc.json파일의 extends 에 next/babel을 추가하였다. { "extends": ["next/babel", "next/core-web-vitals"] } .eslintrc.json 파일 조언 받았던 추가 해결 방법들) 1. 프로젝트의.. 2022. 1. 24.
[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.