next-serverless
next-serverless copied to clipboard
Allow working with serverless-offline
@aequasi what is your setup to run next-serverless alongside serverless-offline? Thank!
Hi @aequasi, sorry for the very late response, I unfortunately didn't have much time in the last month.
But thank you a lot for your contribution!
I tried to set it up in a test project but got this error when I run sls offline:
> Could not find a valid build in the '.../next-serverless-offline-test/offline/.next' directory! Try building your app with 'next build' before starting the server.
It looks like it searches for the next.js build in the wrong folder (I don't know where the /offline/ folder comes from, that doesn't exist).
This example was without a custom server, I then tried it with a custom server and there it worked without a problem.
I would like this feature to work for both possible setups, with and without a custom server. Do you have an idea where this /offline/ folder comes from and how this could be fixed (if you also had this problem)?