next-serverless icon indicating copy to clipboard operation
next-serverless copied to clipboard

Allow working with serverless-offline

Open cryptiklemur opened this issue 6 years ago • 2 comments

cryptiklemur avatar Dec 29 '18 22:12 cryptiklemur

@aequasi what is your setup to run next-serverless alongside serverless-offline? Thank!

JorgeCeja avatar Jan 30 '19 01:01 JorgeCeja

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)?

cyrilwanner avatar Jan 30 '19 14:01 cyrilwanner