#local build fine, Vercel build fails?

21 messages · Page 1 of 1 (latest)

bright imp
#

Try redeploying without a build cache to vercel

#

to be honest there have been a bunch of reports over the last couple weeks of vercel builds failing due to random errors

#

Also, make sure the project's node version in Vercel matches the node version of your local machine

#

you can find the node version under the project settings in vercel

primal harbor
#

Will do. Thank you.

#

My bad. Vercel and local build match with same error. It is local dev (next dev) and local build (next build) that differ...

bright imp
#

An then that sounds like just a typical typescript error

#

Fix whatever type it’s referring to

#

Or cast it to any

#

Or suppress it with ts-ignore

primal harbor
#

Indeed. So the strictness of typescript is different between next dev and next build. Interesting...

bright imp
#

I don’t think next dev gives any ts errors to begin with?

#

The strictness will be whatever is configured in your tsconfig

#

You can run “tsc”

#

To confirm the type checker behavior outside of next build

formal pebble
#

They load through routing but if I refresh the page, it will throw 500 error

#

redeploying it without cache seems to fix it

bright imp
#

Interesting

#

I saw a totally different issue, not using turbo repo, and it too was fixed by disabling the build cache

#

And then I also ran into build issues personally on vercel (but only on the production branch, preview worked fine) where I had to explicitly disable appDir in next config experimental settings