NextJS site returning 500 since netlify.toml

Context: This is a site which downloads an image based on a few parameters, processes it in the api/images.ts and then returns it to the user.

Site name: sl-samuraipunks.netlify.app

Source code: github.com/samurai-legends/samuraipunks

For some reason my site is returning a 500 error, can’t view anything. The logs also don’t show anything, since the page is not being loaded.

Notes:

  • nextjs dev works fine
  • nextjs build and then start works fine
  • netlify-cli dev works fine
  • netlify-cli build works fine
  • just the online version breaks

This started when I added the netlify.toml file, if I remove it the blank page goes away and the page loads, but then the generate function breaks since sharp won’t load, because it needs to be included.

Any tips?

1 Like

Perhaps related

1 Like

What’s your build settings configured to?

Hi, thanks, these are my build settings.

Build log:

(succeeds, don’t know if this is useful)

@SamO Accidentally replied to my own post instead of yours, tagging you instead.

Hey @ThijmenMaus,

Can you try to clear cache and re-deploy? Looks like something went wrong with function bundling for your deploy and we’re unable to unzip it during execution, causing the 500 error.

Hey @hrishikesh ,

Thanks for your reply. After doing this the issue still persists unfortunately…

Can you share the most recent deploy/build log?