Getting 500 error instead of 404

Hi Developers,

I am using nextjs site with netlify. but I am getting 500 errors on a not found page.

this is the screenshot of netlify odb handler function. but everything is working fine on localhost and vercel. the problem is on the netlify only,

this is the netlify link:
and this is vercel link:

Hey there, @tfsomrat :wave:

Thanks for reaching out! Sorry to hear you are encountering obstacles. Can you please share your project repo that corresponds with this site? This will help us look into your set up a bit more closely.

Hello @hillary

I am sorry for the late reply, I was a little busy exploring Nextjs and Netlify. I cannot share the project repo because of company policy. but I have created another project which has the same issue.

here is the repo: Somrat / next-boilerplate ยท GitLab
and also the live demo:
getting 500 instead of 404:

:wave: @tfsomrat , this blog post walks through how to resolve the path to any additional files that should be included in the function deployment during build: How to Include Files in Netlify Serverless Functions

Let us know if that helps or we should keep digging! :slight_smile: