Next 13 app dir error.tsx causing build error
Unanswered
Chinese Alligator posted this in #help-forum
Chinese AlligatorOP
Hi all. I hope somebody can help me with this. I'm trying to add
Next.js version: 13.4.7
Nx mono repo
error.tsx and it works on local machine. but when I deploy the project to vercel, I get error (pic attached)Next.js version: 13.4.7
Nx mono repo
10 Replies
add
use client to the top of all error.tsx filesChinese AlligatorOP
already added
'use client' directive but error still persists. on local it works fine but errors in vercel 🤷â€â™‚ï¸have you tried building locally with npm run build?
if it fails, try to rebuild again on vercel without build cache
Chinese AlligatorOP
yup local build works. I also disabled vercel cache with
VERCEL_FORCE_NO_BUILD_CACHE but still no luckweird... can you install the vercel CLI and try to deploy from the CLI in your local computer?
Chinese AlligatorOP
will try this
Chinese AlligatorOP
build errors on
vercel build but no useful message on logs 😦then i would contact support or go to vercel discussions https://github.com/orgs/vercel/discussions; if it can build locally this is a vercel problem and we can't really do anything