I am building a Next.js app with page router and I am trying to connect it to Storyblok CMS . Locally everything worked correctly but when I uploaded it to netlify, when I tried to enter the route where I was serving the static props got me an error with the SSR function handler. It was crashing due to a timeout in my Next.js app.
After reading through multiple forums chats and github threads I found out that changing the next.js runtime plugin and the next.js version could help . I end up with 13.4.19
on next.js and for @netlify/plugin-nextjs the 4.41.3
. This worked in first instance. Now the I wanted to activate preview mode, without it is very difficult for a client to work in a static way. I was following this tutorial. When trying to access the route the SSR function handler correctly intercept the call but I have the same crashing issue as mentioned before. I must say all the next builds, build correctly. Here is the log of what I am seeing:
Mar 7, 04:42:59 PM: 03f45e64 ERROR Task timed out after 10.02 seconds
Mar 7, 04:42:59 PM: 03f45e64 Duration: 10021.94 ms Memory Usage: 283 MB
Mar 7, 04:42:59 PM: INIT_START Runtime Version: nodejs:20.v18 Runtime Version ARN: arn:aws:lambda:us-east-1::runtime:b8c2913782bf648152634d2f893a4c02250aec5884edb545f64c2bd7268d214e
Mar 7, 04:43:00 PM: 72881085 INFO - info Loaded env from /var/task/.env.local
Mar 7, 04:43:02 PM: 72881085 INFO account
My site is under an authentication wall, that’s why i can’t send you a repro example.
Thanks