[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
我试图将我的nextjs网站部署到vercel
默认情况下Vercel将使用npm install
命令来安装所需的依赖项。您可以使用npm install --force
或npm install --legacy-peer-deps
命令覆盖该命令。你可以从Build &开发设置部分
use
npm i --legacy-peer-deps
不是
npm install
安装包:
npm i package-name --legacy-peer-deps