tinacms / tina-self-hosted-demo

A Next.js + TinaCMS starter site hosted on entirely on Vercel
https://tina-self-hosted-demo-umber.vercel.app
Apache License 2.0
116 stars 40 forks source link

Vercel deployment failed because ESLint version mismatch in peerdependency #122

Open git-no opened 1 month ago

git-no commented 1 month ago

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: tina-self-hosted-demo@0.1.0
[15:10:09.351] npm error Found: eslint@9.9.0
[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 eslint-config-next@14.2.5
[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.

despino-streaver commented 2 weeks ago

Yes, the solution is to downgrade ESLint to ^8.43.0 and has been available in the core repo since a previous release as it is stated here: https://github.com/tinacms/tinacms/issues/4744#issuecomment-2354464295