Boa Noite, fiquei a tarde toda tentando resolver vários problemas deste novo projeto, tentei instalar o Material UI e o Styled components, tentei pela documentação, tentei tudo, e não resolveu, continua aparecendo vários erros tanto na Instalação do MATERIAL UI como segue o exemplo e erros também no useHistory. Se alguem puder ajudar, vi que estes problemas estao sendo recorrentes nesta materia em questão.
ERROR in ./src/pages/Carrinho/index.js 33:18-28
export 'useHistory' (imported as 'useHistory') was not found in 'react-router-dom' (possible exports: AbortedDeferredError, Await, BrowserRouter, Form, HashRouter, Link, MemoryRouter, NavLink, Navigate, NavigationType, Outlet, Route, Router, RouterProvider, Routes, ScrollRestoration, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, UNSAFE_useScrollRestoration, createBrowserRouter, createHashRouter, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, createSearchParams, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, renderMatches, resolvePath, unstable_HistoryRouter, unstable_useBlocker, unstable_usePrompt, useActionData, useAsyncError, useAsyncValue, useBeforeUnload, useFetcher, useFetchers, useFormAction, useHref, useInRouterContext, useLinkClickHandler, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes, useSearchParams, useSubmit)
ERROR in ./src/components/Produto/index.js 9:0-51 Module not found: Error: Can't resolve '@material-ui/icons/Remove' in 'D:\Documentos\GitHub\mercado\src\components\Produto'
webpack compiled with 21 errors and 1 warning
Deseja finalizar o arquivo em lotes (S/N)? s
PS D:\Documentos\GitHub\mercado> npm install @material-ui/core
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mercado@0.1.0
npm ERR! Found: react@18.2.0
npm ERR! node_modules/react
npm ERR! react@"^18.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.12.4
npm ERR! node_modules/@material-ui/core
npm ERR! @material-ui/core@"*" from the root project