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
`config.json` 's body is just `nextConfig`, not valid JSON. #88
I see, it seems like Next changed code a bit, there used actual configuration (aka. object) in place of nextConfig.
For quick-fix, you can downgrade next.js, I will look into it in a meantime.
So I am getting an error when uploading this to AWS Lambda:
When you look in the generated
config.json
the entire body is as followsso it is NOT valid json.
I did some digging in the code and found this area here where it seems to try and pull the contents of that
config.json
https://github.com/sladg/nextjs-lambda/blob/1b278aef890e86f17ddf81998913ea88b8391b37/lib/cli/pack.ts#L93 using this regex: https://github.com/sladg/nextjs-lambda/blob/1b278aef890e86f17ddf81998913ea88b8391b37/lib/consts.ts#LL1C14-L1C35So when I do the same search locally in my generated files I find this bit of code:
Notice the second to last line there. It seems to just be pulling the string
nextConfig
rather than the value of it.Here is my package.json
Any suggestions?