Deployment fails with: npm error Invalid Version

Trying to deploy my NextJS project with supabase auth to vercel and I keep getting this error:

npm error Invalid Version:
npm error A complete log of this run can be found in: /vercel/.npm/_logs/2025-09-03T05_28_23_906Z-debug-0.log
Error: Command "npm install" exited with 1

Updated the versions in my package.json, removed package-lock.json and node_modules and then did npm i to reinstall and still the same issue. No more info provided about what version is invalid.

Running npm run build locally runs fine without any issues.

This is my github repo that I am trying to import:

Any help will be appreciated.

Hey, Abhi! Welcome to the Vercel Community. :waving_hand:

I just tried to deploy this myself and didn’t get that error. It actually successfully deployed!

The error I did get was 500: MIDDLEWARE_INVOCATION_FAILED

I looked into the logs and it seems that it happened because I don’t have Supabase variables set on my project, which is expected. :slight_smile:

Hopefully this helps! Feel free to share what worked for you.

1 Like

Thanks Pauline for trying it out, maybe I should use a different machine, let me try this on my PC and see if that works.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.