adrianhajdin / ecommerce_sanity_stripe

Modern Full Stack ECommerce Application with Stripe
https://jsmastery.pro
2.21k stars 674 forks source link

Problems with deployment #32

Open Mhmd7770777 opened 2 years ago

Mhmd7770777 commented 2 years ago

Screenshot (101) Screenshot (102) Screenshot (103)

for some reasons i cant deploy my app on vercel, something about incorrect peer dependencies i guess.I can provide other screenshots of my code or of the error if needed.i tried everything and it is still not working.

Also,something is wrong as an error show warning " > next-sanity-image@3.2.1" has incorrect peer dependency "@sanity/client@^2.11.0".

but in the code you can see that my @sanity/client is ^3.2.0 not 2.11.0, and i dont know the reason for that.

or maybe the problem is

./components/index.js
00:00:45.671 | Module not found: Can't resolve './Product' in '/vercel/path0/components'
00:00:45.672 |  
00:00:45.672 | Import trace for requested module:
00:00:45.672 | ./pages/_app.js
00:00:45.672 |  
00:00:45.672 | ./pages/_app.js
00:00:45.672 | Module not found: Can't resolve '../context/StateContext' in '/vercel/path0/pages'
00:00:45.672 |  
00:00:45.672 | ./pages/product/[slug].js
00:00:45.672 | Module not found: Can't resolve '../../context/StateContext' in '/vercel/path0/pages/product'

where vercel cant resolve statecontext and other things for some reasons

please help

DevPrograme commented 2 years ago

image I am getting the Same problem

umituysal commented 1 year ago

Try doing the npm install --legacy-peer-deps within the Vercel project deploy page.

When deploying your project, go to the "build and output" settings, and in the npm command input write, npm install --legacy-peer-deps.

Select the override radio button, then try deploying.