Vercel 构建部署错误:npm ERR!ERESOLVE 无法解析依赖关系树 - 解析时:mocha-store@0.1.0

Owo*_*nde 1 npm vercel sanity

[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

小智 9

默认情况下,Vercel 将使用npm install命令安装所需的依赖项。您可以使用npm install --force或 withnpm install --legacy-peer-deps命令覆盖该命令。您可以从 Vercel 仪表板的“构建和开发设置”部分执行此操作。