You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We’ve been successfully using sladg/nextjs-lambda for building our pages router, and it has been working as expected.
Recently, we upgraded to Next.js 14 and started implementing the app router. While we were able to render server components without any issues, we encountered a problem with the route handlers. Specifically, we are receiving a 502 response when trying to access them.
Static assets are deployed into s3, server.js is on lamda function.
Note : we are using cloudfront to as an origin.
File structure :
Below is our build configuration for your reference:
build.sh
set -x
# caching optimizations
npm config -g set prefer-offline true
# ci
npm ci
# build
npm run build
# move any generated public/*.* resources into Lambda
mkdir .next/standalone/public
mkdir .next/standalone/.next/static
cp -R public/. .next/standalone/public
cp -R .next/static/. .next/standalone/.next/static
# pack
npx --package @sladg/nextjs-lambda cli pack```
The text was updated successfully, but these errors were encountered:
Hi Team,
We’ve been successfully using
sladg/nextjs-lambda
for building our pages router, and it has been working as expected.Recently, we upgraded to Next.js 14 and started implementing the app router. While we were able to render server components without any issues, we encountered a problem with the route handlers. Specifically, we are receiving a 502 response when trying to access them.
Static assets are deployed into s3, server.js is on lamda function.
Note : we are using cloudfront to as an origin.
File structure :
Below is our build configuration for your reference:
build.sh
The text was updated successfully, but these errors were encountered: