Serverless-next.js: Static Pages in S3 not in static-pages/ folder

Created on 20 Aug 2020  路  2Comments  路  Source: serverless-nextjs/serverless-next.js

I am attempting to deploy my application using serverless-nextjs and have run into issues. Here are the steps i am taking:

  1. Add a serverless.yml file to existing nextjs project and added this code
    myNextApplication: component: "@sls-next/[email protected]" # it is recommended you pin the latest stable version of serverless-next.js

  2. Run serverless in the console to deploy.

After serverless is finished deploying with no errors, it provides you with a cloud front url. Unfortunately, when i open it up i get a simple "This site can't be reached".

Taking a deeper look in the AWS console and looking into the s3 bucket that was created on deployment, i noticed that the static-pages folder did not exist, but rather each static html page was called static-pages/pagename.html

Capture

Any ideas why this could be happening?? I did some testing just to see if i could get it to at least work by manually adding a static-pages folder and adding the static html pages inside that folder. That seemed to at least get the pages to display properly, but when i wanted to make an update to some of the pages, i ran serverless and would not update anything inside the static-pages folder.

Most helpful comment

I believe this is fixed in the latest alpha (.6) Could you try using that?

Ok that seemed to work. I cleared everything out in the S3 bucket, updated my serverless.yml, and ran serverless and everything is working as it should. Thanks for your speedy help!

All 2 comments

I believe this is fixed in the latest alpha (.6) Could you try using that?

I believe this is fixed in the latest alpha (.6) Could you try using that?

Ok that seemed to work. I cleared everything out in the S3 bucket, updated my serverless.yml, and ran serverless and everything is working as it should. Thanks for your speedy help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Meemaw picture Meemaw  路  23Comments

romainquellec picture romainquellec  路  19Comments

oste picture oste  路  19Comments

medv picture medv  路  15Comments

asterikx picture asterikx  路  42Comments