Netlify and nextjs dynamic routes throws Internal Server Error

My website was working fine and all of sudden this start to happen:

Internal Server Error

Getting the error on the hard reloading of any dynamic page.

Using npm run build and have no data fetching in the pages:

// pages/programs/[id]/index.html
import Program from '@features/program/Program';

const ProgramPage: React.FC = () => {
  return <Program />;

export default ProgramPage;

Tried using npm run export to generate the pages but samething happened.

Maybe it is time to move to Vercel!?

Hi @HypaDriveAi,

Thanks for reaching out!

Could you share the site (either the URL to the site or the site name ( that you’re experiencing this issue and the steps to reproduce?

Please have a look at the screenshot, this is what I get on page reload but works fine when loading a static page e.g. and from there I can navigate to each program.

This requires signup and some sort of confirmation, sorry if I cannot provide access.

@Melvin can you please check this?

Hi @Melvin is this something related to this issue?

@hrishikesh Can you please look into this? I am using Next 12, also tried with version 13.
This is working on Vercel fine.

Please share your site name instead of screenshots. Since you cannot provide access, I’m afraid we cannot reproduce the issue.

I’m seeing some errors in your function console:

not sure if they’re relevant

You might have to solve them by adding the following to your netlify.toml:

  included_files = ["./node_modules/@aws-sdk/**/*"]

@hrishikesh thanks for looking into this.

That was the issue and it is resolved now.
Where did you get the logs from? I cannot see such thing from my end.

Hiya, glad you found your solution. you can view your function logs here.. I am attaching some helpful documentation to guide you.

Thanks Sam, it’s interesting I cannot see anything there. Also to be mentioned that I don’t have any SSR pages or server side functions.

Not sure where the above logs came from.

Maybe that only shows production environment? how can I switch to another environment?

Go to your deploy: Deploy details | Deploys | app-hypadrive | Netlify

Click on Deployed “Fuctions” here:

If you go here directly: Functions | app-hypadrive | Netlify, you can only check production or filter it for a branch.