본문 바로가기

오류 해결 방법

[react] JSX 구성요소로 사용할 수 없습니다.

 

해결방법: 명시적 설치

yarn remove react-router-dom
yarn add react-router-dom@latest
yarn add --dev @types/react-router-dom@latest

Routes와 Route는 react-router-dom v6 이상에서만 지원됨. v6 이상 버전을 명시적으로 설치했음