I just started working on a new project with React 17, then just a week ago React 18 was launched so I upgraded my project to React 18 after I went through their documentation, everything was going fine until I changed my laptop, I cloned the project from GitHub to my other laptop, and when I tried to "NPM install" it kept giving me NPM dependency error, although it worked fine after I put "--legacy-deep-peers", but now when ever I have to install a dependency I have to use the "--legacy-dep-peers" with it or it keeps giving me the same error, is there a workaround with this or I have to keep using this keyword with all of my new dependencies.
The Error Snippet
https://i.stack.imgur.com/BfKJU.png
My Package.json Dependencies
"dependencies": {
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/react": "^12.1.3",
"@testing-library/user-event": "^13.5.0",
"axios": "^0.26.0",
"bootstrap": "^5.1.3",
"framer-motion": "^6.2.9",
"hamburger-react": "^2.5.0",
"js-cookie": "^3.0.1",
"nanoid": "^3.3.1",
"prop-types": "^15.8.1",
"react": "^18.0.0",
"react-bootstrap": "^2.2.0",
"react-datepicker": "^4.7.0",
"react-dnd": "^16.0.0",
"react-dnd-html5-backend": "^16.0.0",
"react-dom": "^18.0.0",
"react-hook-form": "^7.29.0",
"react-icons": "^4.3.1",
"react-multi-carousel": "^2.8.0",
"react-redux": "^7.2.8",
"react-router": "^6.2.2",
"react-router-dom": "^6.2.2",
"react-scripts": "5.0.0",
"react-tag-input": "^6.8.0",
"react-toastify": "^8.2.0",
"redux": "^4.1.2",
"redux-devtools-extension": "^2.13.9",
"redux-thunk": "^2.4.1",
"web-vitals": "^2.1.4"}