Node.js version errors

Issue Summary

My builds complete successfully but deployments immediately fail with contradictory Node.js version validation errors. The error messages keep changing and asking for versions that aren’t available in the dashboard.

Project Details

  • Project: meal-mate-app
  • GitHub Repo: Austine96/MealMate
  • Framework: Vite + React + TypeScript
  • Latest Deployment: a822782

What’s Happening

Every deployment follows this pattern:

  1. :white_check_mark: Build completes successfully->

1568 modules transformed.
✓ built in 4.82s
2. :cross_mark: Immediately fails with Node.js version error

Error: Found invalid Node.js Version: “X” Please set “engines”: { “node”: “Y” } in your package.json


## The Contradictory Errors

The error messages keep contradicting each other:

**First deployment:**
- Set Node to 18.x → Error: "18.x is discontinued, use 22.x"

**Second deployment:**
- Set Node to 22.x → Error: "22.x is invalid, use 18.x"

**Third deployment:**
- Set Node to 20.x → Error: "20.x is invalid, use 18.x"

**Problem:** Dashboard only offers 20.x and 22.x (NOT 18.x!)

## What I've Tried

✅ **Removed all Node.js specifications:**
- Deleted `.nvmrc` file
- Removed `engines` field from `package.json`
- Result: Still fails

✅ **Set Node.js in Dashboard Settings:**
- Settings → General → Node.js Version
- Tried 20.x: Failed
- Tried 22.x: Failed

✅ **Cleared build cache:**
- Used "Redeploy without cache" multiple times
- Logs confirm: "Skipping build cache since Node.js version changed"

✅ **Matched code and dashboard:**
- Set both `package.json` and dashboard to 20.x
- Set both to 22.x
- Result: Both combinations fail

## Build Logs Evidence

Every deployment shows successful build followed by validation error:

20:14:07.782 vite v5.4.8 building for production… 20:14:12.781 ✓ built in 4.97s 20:14:12.844 Error: Found invalid Node.js Version: “22.x”
The build works perfectly - validation is broken.

The Core Issue

This appears to be a bug in Vercel’s post-build validation system:

  1. Builds succeed (proven by logs)
  2. Validation fails with incorrect error messages
  3. Error asks for Node 18.x which is deprecated and unavailable
  4. Dashboard only offers 20.x and 22.x
  5. No combination of settings works

What I Need

  1. :white_check_mark: Explanation of why validation asks for 18.x when it’s not available
  2. :white_check_mark: How to bypass this broken validation
  3. :white_check_mark: Fix for the contradictory error messages
  4. :white_check_mark: Successful deployment of my working app

Additional Context

  • App works perfectly locally (npm run build succeeds)
  • Same codebase deployed successfully on other platforms
  • This started happening recently (possibly after a Vercel platform update?)
  • Multiple redeployments over 2 days - all fail the same way

Question

Is this a known bug? Is there a workaround to bypass Node.js validation or force deployment to complete?

Any help would be greatly appreciated! The app is ready to go live but blocked by this validation issue.

@pawlean here is my issue. cc @jacobparis

Hi,

We no longer support Node.js v18 because the Node.js team has deprecated it. Supported Node.js versions

You need to upgrade to at least Node.js v20 to deploy at Vercel.

1 Like

i have in my code and still not taking it you want me to share my code here ?

Please share gitHub repository so we can take a look

Hi Swarnava,

Here is my GitHub repository:

https://github.com/Austine96/MealMate

The issue: All deployments fail with Node.js version errors even after setting Node 20.x in both package.json and Vercel settings.

Latest failed deployment: bbf7b419ae3c3554ea8a5bac8ccff2e312883

Thanks for your help!

just made it public so we can fix this

Can you try removing “runtime”: “@vercel/node@3.0.0” from your vercel.json and deploy?


still got the same error

The error is:

Error: Function must contain at least one property.

It’s not related to Node.js. it’s because your function property is invalid: MealMate/vercel.json at main · Austine96/MealMate · GitHub

thanks it working now we can close this