Notice
Recent Posts
Recent Comments
-
[React] Can't resolve 'react-router-dom' 해결 방법 본문
반응형
react-router-dom 은 리액트 패키지(create-react-app)에 포함되어있지 않기 때문에 추가 설치를 해줘야한다.
npm i -s react-router-dom
또한 Route 태그는 Routes 태그로 감싸주어야 한다.
<Routes>
<Route path="/" element={<MainPage />} />
</Routes>
반응형
'Web' 카테고리의 다른 글
[npm 에러] npm ERR code ETARGET (0) | 2023.01.27 |
---|---|
[Node js] 설치, 버전 변경 (0) | 2022.11.07 |
Comments