Next.js Discord

Discord Forum

Error on build on Vercel

Answered
Fork-tailed Storm-Petrel posted this in #help-forum
Open in Discord
Fork-tailed Storm-PetrelOP
Hello, everyone!

I'm trying to deploy for first time my project in Vercel, a Next.js app.
But when I try to deploy (from a GitHub repo and choosing "Next.js" as framework) I have this error.

I'm sure it's my mistake, but I don't know where. Can you help me?

Thanks in advance!
Answered by Fork-tailed Storm-Petrel
I drop my node_modules folder because I want to check if it happens also in my local. I deleted npm cache and then when I tried npm ls --all it didn't work.
But, I update every version of package.json to latest and problem solved.

So, that's it.

I thought it was a Vercel problem because in my computer "npm install" was working, but I think because of npm cache.

Thanks!!
View full answer

2 Replies

Toyger
try to run
npm ls --all
and in output find which package use this pump
Fork-tailed Storm-PetrelOP
I drop my node_modules folder because I want to check if it happens also in my local. I deleted npm cache and then when I tried npm ls --all it didn't work.
But, I update every version of package.json to latest and problem solved.

So, that's it.

I thought it was a Vercel problem because in my computer "npm install" was working, but I think because of npm cache.

Thanks!!
Answer