sladg / nextjs-lambda

Lambda deployments for Nextjs12 & Nextjs13 (standalone). Easy CLI commands to get your standalone Next output to run in AWS Lambda (not @Edge)! Uses CDK in behind and produces code zips importable to Terraform, Serverless, Azure, etc.
MIT License
169 stars 19 forks source link

Process failed with error: Error: Public folder assets must be nested in public/assets folder #86

Closed iamvade closed 1 year ago

iamvade commented 1 year ago

Use case: NextJS 13 blank project standalone and compress options on next.config.js added

"Process failed with error: Error: Public folder assets must be nested in public/assets folder" Getting error above when run "npx --package @sladg/nextjs-lambda cli pack" command.

davulrich commented 1 year ago

You need to create assets folder directly in the public folder and move all content of the public folder into it. image

In Readme file you can find what's the reason behind it.

sladg commented 1 year ago

Exactly as @davulrich stated.