2
import { ColorModeContext, useMode } from "./theme";
import { CssBaseline, ThemeProvider } from "@mui/material";
import Topbar from "./scenes/global/Topbar";
import Sidebar from "./scenes/global/Sidebar";

function App() {
  const [theme, colorMode] = useMode();
  return (
    <ColorModeContext.Provider value={colorMode}>
      <ThemeProvider theme={theme}>
        <CssBaseline/>
        <div className="app">
          <main className="content">
            <Topbar/>
            <Sidebar/>           
          </main>
        </div>
      </ThemeProvider>
    </ColorModeContext.Provider>
  );
}
export default App;

  
  • List item npm WARN ERESOLVE overriding peer dependency

npm WARN While resolving: [email protected]

npm WARN Found: [email protected]

npm WARN node_modules/react

npm WARN react@"^18.2.0" from the root project

npm WARN 16 more (@emotion/react, @emotion/styled, ...)

npm WARN

npm WARN Could not resolve dependency:

npm WARN peer react@"^16.3.0 || 17" from [email protected]

npm WARN node_modules/react-pro-sidebar/node_modules/react-slidedown

npm WARN react-slidedown@"^2.4.5" from [email protected]

npm WARN node_modules/react-pro-sidebar

npm WARN npm WARN Conflicting peer dependency: [email protected]

npm WARN node_modules/react

npm WARN peer react@"^16.3.0 || 17" from [email protected]

npm WARN node_modules/react-pro-sidebar/node_modules/react-slidedown

npm WARN react-slidedown@"^2.4.5" from [email protected]

npm WARN node_modules/react-pro-sidebar

npm WARN ERESOLVE overriding peer dependency

npm WARN While resolving: [email protected]

npm WARN Found: [email protected]

npm WARN node_modules/react-dom

npm WARN react-dom@"^18.2.0" from the r

oot project npm WARN 6 more (@mui/base, @mui/material, @testing-library/react,

...) npm WARN

npm WARN Could not resolve dependency: npm WARN peer react-dom@"^16.3.0 || 17" from [email protected]

npm WARN node_modules/react-pro-sidebar/node_modules/react-slidedown

npm WARN react-slidedown@"^2.4.5" from [email protected]

npm WARN node_modules/react-pro-sidebar

npm WARN npm WARN Conflicting peer dependency: [email protected]

npm WARN node_modules/react-dom

npm WARN peer react-dom@"^16.3.0 || 17" from [email protected]

npm WARN node_modules/react-pro-sidebar/node_modules/react-slidedown

npm WARN react-slidedown@"^2.4.5" from [email protected]

npm WARN node_modules/react-pro-sidebar


4
  • May be your TopBar and SideBAr is not correct. Commented Nov 30, 2022 at 8:45
  • Or Might you have missed any dependency? Commented Nov 30, 2022 at 8:45
  • Show your App.js file please Commented Nov 30, 2022 at 8:46
  • I think you badly exported that modules. Commented Nov 30, 2022 at 8:49

2 Answers 2

1

Remove the .src/ part from the paths for those 2 imports

import Topbar from "./scenes/global/Topbar"
import Sidebar from "./scenes/global/Sidear"
Sign up to request clarification or add additional context in comments.

4 Comments

Have you installed your dependencies?
If not, you need to run npm install from the root directory
Also, please add the code instead of screenshots as it makes it easier for everyone to see your code.
0

you should navigate to the root directory of your react project, then run npm install command to install all modules, and run npm run start to start your react app

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.