If you are here, then you might be trying to deploy Next.js v13 to AWS using @sls-next component. As of now, the @sls-next component does not support Next.js v13.
@sls-next component is adding
target: "serverless" configuration dynamically to next.config.js. Here is the code that is doing it, link:
Many suggests to use
output configuration instead. But,
output does not work exactly like
I was trying to explain the reason behind the error. Hope, I could throw some light.