Reputation: 1
I am taking a Codecademy full-stack dev course and am attempting to create my first full React application locally per the course's instruction. I have followed all the steps to install NodeJS and NPM and have not had any issues until I attempt to create the app itself, then it throws an error. I ignored it at first but when I open my new React web app it gives an error itself and won't accept any of my updates, so I'm assuming this dependency error is stopping the app from functioning at all. I have reinstalled both Node and NPM to be sure they are up to date, so I know that isn't an issue. I have also tried running the command with both --force and --legacy-peer-deps, but both still throw the exact same error. I have also tried creating this app in multiple different directory locations but that hasn't made a difference either. I'll include the error message below.
CMD code/error: Installing template dependencies using npm... npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: [email protected] npm error Found: [email protected] npm error node_modules/react npm error react@"^19.0.0" from the root project npm error npm error Could not resolve dependency: npm error peer react@"^18.0.0" from @testing-library/[email protected] npm error node_modules/@testing-library/react npm error @testing-library/react@"^13.0.0" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution.
Upvotes: -1
Views: 23