#Local Build fine, Vercel Build fails?

10 messages · Page 1 of 1 (latest)

hushed pike
#

I've had a main and a v3 branch on my repo, both are deployed with main on the root domain and v3 on a subdomain. Everything runs fine, both deployed fine.

I then merged v3 into main locally and resolved any issues. I can locally build this just fine, and run it in dev mode. No errors, no warnings etc.

I then pushed my merged main branch back to Git, but the deployment for this branch continually fails, despite it building locally.

Seems to fail with the below, but I have no idea why?

Note: Not using build cache:
  - can not verify whether nodejs version of build cache (14.x) is same as current detected version (16.x)
Running "vercel build"
Vercel CLI 28.5.6
Installing dependencies...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.2.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^17.0.0 || ^16.3.0 || ^15.5.4" from [email protected]
npm ERR! node_modules/react-json-view
npm ERR!   react-json-view@"^1.21.3" 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! See /vercel/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /vercel/.npm/_logs/2022-11-22T15_47_43_215Z-debug-0.log

./src/components/Sidebar.js
106:11  Error: Missing "key" prop for element in iterator  react/jsx-key

Does anyone know what the heck is going on? None of these errors exist locally when building

git push --force returns "Everything up-to-date"

terse magnet
#

whats your local node version?

#

I havent used Vercel in a while but it looks like the default node version is v16, while you re presumably using v14 locally

#

If thats the case, I would try v16 locally and see if I get the same error

hushed pike
#

Nope, i had that issue when doing v3, so used nvm and deployed v16 locally too

#

Checked on Vercel and thats also on v16

peak aspen
#

Can you try running vercel build locally? This should help you pinpoint the issue

hushed pike
#

yep, no issues

#

builds just fine

#

oh interesting..... builds fine on Windows, but not on MacOS