
페이지 라우트 처리를 다 완료 했는데 이런 에러가 발생했다.
최종적으로 src index.js 에 BrowserRouter 처리를 해주지 않았기 때문에 발생한 문제이다.
import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import App from "./components/App";
import reportWebVitals from "./reportWebVitals";
import { Provider } from "react-redux";
import { store } from "../src/redux/store";
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<App />{" "}
</BrowserRouter>
</Provider>,
document.getElementById("root")
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
이렇게 수정해주면 오류가 사라진다.
'에러 해결' 카테고리의 다른 글
| [ React Error ] Failed to load config "react-app" to extend from. (0) | 2022.11.09 |
|---|---|
| [React-Query]error: Missing queryFn error when using useQuery (0) | 2022.04.25 |
| [React]error: Warning: Each child in a list should have a unique "key" props (0) | 2022.04.25 |
| [Git] error: failed to push some refs to (0) | 2022.01.04 |
| [Aws]error: aws Amplify 배포할 때 이미지 유실 문제 (0) | 2021.11.25 |