Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJulieta Dalla Pozza
4,337 PointsGet error when routing
Hello, I'm trying to follow the project, and when trying to route an error in the console appears. I checked if I have more than one react project and maybe this could be causing the problem.
THE ERROR
react.development.js:207 Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
- You might have mismatching versions of React and the renderer (such as React DOM)
- You might be breaking the Rules of Hooks
- You might have more than one copy of React in the same app See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
WHAT I GOT WHEN TRYING TO FIGURE IT OUT WHATS IS HAPPENNING ├─┬ @mui/system@5.8.0 │ │ ├─┬ @mui/private-theming@5.8.0 │ │ │ └── react@18.1.0 deduped │ │ ├─┬ @mui/styled-engine@5.8.0 │ │ │ └── react@18.1.0 deduped │ │ └── react@18.1.0 deduped │ ├─┬ @mui/utils@5.8.0 │ │ └── react@18.1.0 deduped │ ├─┬ react-dom@18.1.0 │ │ └── react@18.1.0 deduped │ ├─┬ react-transition-group@4.4.2 │ │ └── react@18.1.0 deduped │ └── react@18.1.0 deduped └─┬ react-router-dom@6.3.0 ├─┬ react-router@6.3.0 │ └── react@18.1.0 deduped └── react@18.1.0 deduped