Next.js Discord

Discord Forum

Deploying to Vercel giving eslent dependency errors

Answered
Forest bachac posted this in #help-forum
Open in Discord
Forest bachacOP
A bit of a n00b to react / next.js and such so I started with the t3app and built on that. Made some basic changes along the way but the app compiles and runs locally. When I attempt to push to vercel I get this issue and my googlefu is failing me currently. Thanks!

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: eslint-config-next@12.0.4
npm ERR! Found: eslint@8.43.0
npm ERR! node_modules/eslint
npm ERR! dev eslint@"^8.40.0" from the root project
npm ERR! peer eslint@"^6.0.0 ^7.0.0 >=8.0.0" from @eslint-community/eslint-utils@4.4.0
npm ERR! node_modules/@Somali-community/eslint-utils
npm ERR! @eslint-community/eslint-utils@"^4.2.0" from @typescript-eslint/utils@5.60.1
npm ERR! node_modules/@typescript-eslint/utils
npm ERR! @typescript-eslint/utils@"5.60.1" from @typescript-eslint/eslint-plugin@5.60.1
npm ERR! node_modules/@typescript-eslint/eslint-plugin
npm ERR! dev @typescript-eslint/eslint-plugin@"^5.59.6" from the root project
npm ERR! 1 more (@typescript-eslint/type-utils)
npm ERR! @eslint-community/eslint-utils@"^4.2.0" from eslint@8.43.0
npm ERR! 9 more (@typescript-eslint/eslint-plugin, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^7.23.0" from eslint-config-next@12.0.4
npm ERR! node_modules/eslint-config-next
npm ERR! dev eslint-config-next@"^12.0.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint@7.32.0
npm ERR! node_modules/eslint
npm ERR! peer eslint@"^7.23.0" from eslint-config-next@12.0.4
npm ERR! node_modules/eslint-config-next
npm ERR! dev eslint-config-next@"^12.0.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /vercel/.npm/_logs/2023-07-02T21_51_15_359Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in:
npm ERR! /vercel/.npm/_logs/2023-07-02T21_51_15_359Z-debug-0.log
Error: Command "npm install" exited with 1
BUILD_UTILS_SPAWN_1: Command "npm install" exited with 1
Answered by Pip gall wasp
View full answer

19 Replies

Somali
@Forest bachac A bit of a n00b to react / next.js and such so I started with the t3app and built on that. Made some basic changes along the way but the app compiles and runs locally. When I attempt to push to vercel I get this issue and my googlefu is failing me currently. Thanks! npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: eslint-config-next@12.0.4 npm ERR! Found: eslint@8.43.0 npm ERR! node_modules/eslint npm ERR! dev eslint@"^8.40.0" from the root project npm ERR! peer eslint@"^6.0.0 || ^7.0.0 || >=8.0.0" from @eslint-community/eslint-utils@4.4.0 npm ERR! node_modules/<@258055326215962626>-community/eslint-utils npm ERR! @eslint-community/eslint-utils@"^4.2.0" from @typescript-eslint/utils@5.60.1 npm ERR! node_modules/@typescript-eslint/utils npm ERR! @typescript-eslint/utils@"5.60.1" from @typescript-eslint/eslint-plugin@5.60.1 npm ERR! node_modules/@typescript-eslint/eslint-plugin npm ERR! dev @typescript-eslint/eslint-plugin@"^5.59.6" from the root project npm ERR! 1 more (@typescript-eslint/type-utils) npm ERR! @eslint-community/eslint-utils@"^4.2.0" from eslint@8.43.0 npm ERR! 9 more (@typescript-eslint/eslint-plugin, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer eslint@"^7.23.0" from eslint-config-next@12.0.4 npm ERR! node_modules/eslint-config-next npm ERR! dev eslint-config-next@"^12.0.4" from the root project npm ERR! npm ERR! Conflicting peer dependency: eslint@7.32.0 npm ERR! node_modules/eslint npm ERR! peer eslint@"^7.23.0" from eslint-config-next@12.0.4 npm ERR! node_modules/eslint-config-next npm ERR! dev eslint-config-next@"^12.0.4" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! /vercel/.npm/_logs/2023-07-02T21_51_15_359Z-eresolve-report.txt npm ERR! A complete log of this run can be found in: npm ERR! /vercel/.npm/_logs/2023-07-02T21_51_15_359Z-debug-0.log Error: Command "npm install" exited with 1 BUILD_UTILS_SPAWN_1: Command "npm install" exited with 1
Pip gall wasp
if you are noob then you should start with plain react or nextjs
Forest bachacOP
I played around with plain react a bit
mostly a beat my head against code to learn kind of guy
well new to this world - build a lot in older technologies like jquery and php
Pip gall wasp
try to run the build on localhost
Forest bachacOP
localhost runs fine
Pip gall wasp
I mean the build version
Forest bachacOP
yeah just double checked -
npm run build
npm start
runs great (only warnings I know how to address)
Pip gall wasp
If you can provide more details about the warnings you're encountering, I'd be happy to assist you in addressing them
Forest bachacOP
passHref issue but it looks like there is an article on it, I'm not sure that is causing the vercel deployment issue though
the vercel deployment issue seems to be more aligned with eslint version or dependency issue
Pip gall wasp
Answer
Pip gall wasp
you can try this
Forest bachacOP
awesome! that worked so first off Thank You! do you mind providing any insight as to why that happened? are there libraries that should be updated
Pip gall wasp
because of conflicting packages dependencies as you can see in the logs
😆
check dm drewhack 🙂 I gave you my package.json if you need it
Forest bachacOP
Thanks!!