-1

[20:19:35.061] Cloning github.com/oneboyfromife/macho-store (Branch: main, Commit: 48072bd) [20:19:35.209] Previous build cache not available [20:19:36.082] Cloning completed: 1.020s [20:19:36.317] Running "vercel build" [20:19:36.972] Vercel CLI 28.10.0 [20:19:37.389] Installing dependencies... [20:19:39.176] npm ERR! code ERESOLVE [20:19:39.179] npm ERR! ERESOLVE unable to resolve dependency tree [20:19:39.180] npm ERR! [20:19:39.180] npm ERR! While resolving: mocha-store@0.1.0 [20:19:39.180] npm ERR! Found: @sanity/client@3.4.1 [20:19:39.180] npm ERR! node_modules/@sanity/client [20:19:39.180] npm ERR! @sanity/client@"^3.2.0" from the root project [20:19:39.181] npm ERR! [20:19:39.181] npm ERR! Could not resolve dependency: [20:19:39.181] npm ERR! peer @sanity/client@"^2.11.0" from next-sanity-image@3.2.1 [20:19:39.181] npm ERR! node_modules/next-sanity-image [20:19:39.181] npm ERR! next-sanity-image@"^3.2.1" from the root project [20:19:39.181] npm ERR! [20:19:39.182] npm ERR! Fix the upstream dependency conflict, or retry [20:19:39.182] npm ERR! this command with --force, or --legacy-peer-deps [20:19:39.182] npm ERR! to accept an incorrect (and potentially broken) dependency resolution. [20:19:39.182] npm ERR! [20:19:39.182] npm ERR! See /vercel/.npm/eresolve-report.txt for a full report. [20:19:39.183] [20:19:39.183] npm ERR! A complete log of this run can be found in: [20:19:39.183] npm ERR! /vercel/.npm/_logs/2022-12-30T19_19_37_735Z-debug-0.log [20:19:39.205] Error: Command "npm install" exited with 1

I was trying to deploy my nextjs website to vercel

juliomalves
  • 42,130
  • 20
  • 150
  • 146
  • Please edit your question to make it legible, it is difficult to understand and answer your question the way it is currently written. – S. C. Dec 30 '22 at 20:50
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 07 '23 at 10:51
  • Does this answer your question? [Fix the upstream dependency conflict installing NPM packages](https://stackoverflow.com/questions/64936044/fix-the-upstream-dependency-conflict-installing-npm-packages) – juliomalves May 20 '23 at 17:28

2 Answers2

4

By default Vercel will use npm install command to install required dependencies. You can override that command with npm install --force or with npm install --legacy-peer-deps command. You can do so from the Build & Development Settings section in Vercel dashboard.

Coreggon
  • 505
  • 2
  • 5
  • 17
0

use

npm i --legacy-peer-deps

instead of

npm install

for install packages do this:

npm i package-name --legacy-peer-deps
SinaPirani
  • 1
  • 1
  • 2