tina-self-hosted-demo
tina-self-hosted-demo copied to clipboard
Vercel deployment failed because ESLint version mismatch in peerdependency
Situation
Creating a tina-seff-hosted-demo following the README description failed at Vercel during Deployment. It seems to me the reason is a mismatch of ESLint version - the repo has defined ESLint version 9, the peer dependency of eslint-config-next is max 8.
Here the deployment log from Vercel
[15:09:58.018] Running build in Washington, D.C., USA (East) – iad1
[15:09:58.177] Cloning github.com/x/tina-self-hosted-demo (Branch: main, Commit: f4c89d9)
[15:09:58.617] Previous build cache not available
[15:09:59.397] Cloning completed: 1.220s
[15:09:59.708] Running "vercel build"
[15:10:00.163] Vercel CLI 36.0.0
[15:10:03.008] Installing dependencies...
[15:10:09.350] npm error code ERESOLVE
[15:10:09.351] npm error ERESOLVE unable to resolve dependency tree
[15:10:09.351] npm error
[15:10:09.351] npm error While resolving: [email protected]
[15:10:09.351] npm error Found: [email protected]
[15:10:09.352] npm error node_modules/eslint
[15:10:09.352] npm error dev eslint@"^9.8.0" from the root project
[15:10:09.352] npm error
[15:10:09.352] npm error Could not resolve dependency:
[15:10:09.352] npm error peer eslint@"^7.23.0 || ^8.0.0" from [email protected]
[15:10:09.352] npm error node_modules/eslint-config-next
[15:10:09.352] npm error dev eslint-config-next@"^14.2.5" from the root project
[15:10:09.352] npm error
[15:10:09.352] npm error Fix the upstream dependency conflict, or retry
[15:10:09.352] npm error this command with --force or --legacy-peer-deps
[15:10:09.352] npm error to accept an incorrect (and potentially broken) dependency resolution.
[15:10:09.352] npm error
[15:10:09.353] npm error
[15:10:09.353] npm error For a full report see:
[15:10:09.353] npm error /vercel/.npm/_logs/2024-08-16T13_10_03_159Z-eresolve-report.txt
[15:10:09.354] npm error A complete log of this run can be found in: /vercel/.npm/_logs/2024-08-16T13_10_03_159Z-debug-0.log
[15:10:09.373] Error: Command "npm install" exited with 1
[15:10:09.610]
FIX
The fix was to edit the ESLint version in the package.json
to version 8.57.0.