shahriarsajeeb / Eshop-tutorial

https://eshop-tutorial.vercel.app
817 stars 280 forks source link

In frontend i can not install module using "npm install". it show error: #20

Open ashishnxt opened 10 months ago

ashishnxt commented 10 months ago

PS D:\clothing\Eshop-tutorial-master\Eshop-tutorial-master\frontend> npm install
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @material-ui/core@4.12.4 npm ERR! Found: react@18.2.0 npm ERR! node_modules/react npm ERR! react@"^18.2.0" from the root project npm ERR! peer react@">=16.3.0" from @paypal/react-paypal-js@7.8.3 npm ERR! node_modules/@paypal/react-paypal-js npm ERR! @paypal/react-paypal-js@"^7.8.3" from the root project npm ERR! 12 more (@reduxjs/toolkit, @stripe/react-stripe-js, ...) 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@"^4.12.4" from the root project npm ERR! peer @material-ui/core@"^4.12.0 || ^5.0.0-beta.0" from @material-ui/data-grid@4.0.0-alpha.37 npm ERR! node_modules/@material-ui/data-grid npm ERR! @material-ui/data-grid@"^4.0.0-alpha.37" from the root project npm ERR! npm ERR! Conflicting peer dependency: react@17.0.2 npm ERR! node_modules/react 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@"^4.12.4" from the root project npm ERR! peer @material-ui/core@"^4.12.0 || ^5.0.0-beta.0" from @material-ui/data-grid@4.0.0-alpha.37 npm ERR! node_modules/@material-ui/data-grid npm ERR! @material-ui/data-grid@"^4.0.0-alpha.37" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\Users\ashis\AppData\Local\npm-cache_logs\2023-10-27T08_39_48_088Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\ashis\AppData\Local\npm-cache_logs\2023-10-27T08_39_48_088Z-debug-0.log

Kavindu1446 commented 10 months ago

Use "yarn" instead using the npm install Then use "yarn start"

ashishnxt commented 10 months ago

I try "npm install --legacy-peer-deps" It's working.

Kavindu1446 commented 10 months ago

Dose you're pages are working correctly? mine pages are not loading only the home page is working

ashishnxt commented 10 months ago

Yes home page working and other page are loading....

ashishnxt commented 10 months ago

IMG_20231027_173747.jpg

Kavindu1446 commented 10 months ago

image

Im getting this error, when logging in, did you login to the dashboard?

ashishnxt commented 10 months ago

Not yet

sabeen2 commented 8 months ago

image

Im getting this error, when logging in, did you login to the dashboard?

You've set up https:// instead of http. Go to frontend/src/server.js and put

export const server = "http://localhost:8000/api/v2";
export const backend_url = "http://localhost:8000/";

If you've used https in one file, make sure to use http in other files too.

amul69906995 commented 6 months ago

i know why u are getting error this is because of conflicting dependencied try using npm install --legacy-peer-deps
npm install --force

pavigitup commented 5 months ago

npm install --legacy-peer-deps npm install --force
no both of these not working

Anonymous-988 commented 4 months ago

Anyone was able to close the above errors?