Problem
I copied and pasted the _middleware.ts from example repo to my Next project, everything worked fine on development environment, and I can run yarn build successfully. When trying to deploy to Vercel, I kept getting an error said An unexpected internal error occurred, then the deploy got failed. The error happened right after Uploading build outputs....
I found the official example will meet the error, too. We cannot even deploy the official example to Vercel.
How to re-produce the issue
Just click the Deploy button on the README page.


Problem
I copied and pasted the
_middleware.tsfrom example repo to my Next project, everything worked fine on development environment, and I can runyarn buildsuccessfully. When trying to deploy to Vercel, I kept getting an error saidAn unexpected internal error occurred, then the deploy got failed. The error happened right afterUploading build outputs....I found the official example will meet the error, too. We cannot even deploy the official example to Vercel.
How to re-produce the issue
Just click the
Deploybutton on the README page.