#local build fine, Vercel build fails?
21 messages · Page 1 of 1 (latest)
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
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...
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
Indeed. So the strictness of typescript is different between next dev and next build. Interesting...
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
I was about to raise an issue regarding this. Using Turborepo, whenever vercel uses cache to do the building part quickly, the dynamic pages fails to load.
They load through routing but if I refresh the page, it will throw 500 error
redeploying it without cache seems to fix it
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