App Router working fine in local but not on Vercel

I can build the app in my local and able to start the server, but keep getting the following error on Vercel.

Running build in Washington, D.C., USA (East) – iad1
Cloning github.com/hsnice16/personal-logs (Branch: main, Commit: 43c43ab)
Cloning completed: 850.000ms
Previous build cache not available
Running "vercel build"
Vercel CLI 40.1.0
Installing dependencies...
added 325 packages in 14s
135 packages are looking for funding
  run `npm fund` for details
Detected Next.js version: 15.1.5
Running "npm run build"
> next-js-app-route-learning@1.0.0 build
> next build
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
   ▲ Next.js 15.1.5
   Creating an optimized production build ...
 ✓ Compiled successfully
   Linting and checking validity of types ...
Error: Command "npm run build" exited with 1


I am using the Next.js 15.x and TailwindCSS 4.x version.

Here’s the code - GitHub - hsnice16/personal-logs: Tracking books I've read and more. Browse around—you might find something interesting! ☕


The error on the Vercel does not mention anything informational that could help to resolve the issue.

So, It would be nice if anyone could help.

Hi @hsnice16, welcome to the Vercel Community!

Sorry to see you facing this issue. I checked your repo and it also builds correctly on my machine.

I see @types/node missing from your package.json dev dependencies. Can you try adding it and redeploying?

Thanks a lot!
It worked.

May I know, how did you find that this could be the issue?

1 Like

Hi @hsnice16, glad it fixed the issue.

When I ran the build locally, I saw this warning, which comes right where you see the error on Vercel build logs:

It looks like you're trying to use TypeScript but do not have the required package(s) installed.
Installing dependencies

If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your app and pages directories).


Installing devDependencies (npm):
- @types/node

1 Like

Oh. Okay.
Thanks for letting me know.

1 Like

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