amplify-hosting icon indicating copy to clipboard operation
amplify-hosting copied to clipboard

Nuxt.js Server Side Rendering (SSR) support

Open siegerts opened this issue 3 years ago • 24 comments

Is your feature request related to a problem? Please describe. Given the current support for Next.js SSR, I'd like to have a similar option for Vue developers.

Describe the solution you'd like I'd like to deploy Nuxt.js SSR-enabled applications to the Amplify Console.

Additional context

siegerts avatar May 19 '21 13:05 siegerts

If you're interested in this, please use reactions to 👍🏻 the post above!

image

siegerts avatar May 19 '21 13:05 siegerts

AWS is misleading in the documentation and giving wrong info

https://aws.amazon.com/about-aws/whats-new/2020/09/amplify-javascript-adds-server-side-rendering-support-frameworks-next-js-nuxt-js/

It is clearly mentiond that AWS Amplify supports NuxtJS with SSR

While AWS Professional support mentioned it is not supported and they even don't have ETA for this feature to be in place ???!!!!

sharaola avatar Aug 01 '21 11:08 sharaola

+1 please!

wgins avatar Aug 30 '21 16:08 wgins

yes please

JDHalm avatar Aug 30 '21 18:08 JDHalm

Is there any estimate when this feature is available? Like @sharaola said it's very misleading information in the corresponding blog post / announcement. As far as I can see AWS has to solve this issue by adding some special workflow when detecting a NuxtJS app during deployment, right? I think it's unfortunately not an open source issue the community can solve, correct?

bart avatar Sep 07 '21 14:09 bart

+1 please

DevRepublicGIT avatar Oct 13 '21 09:10 DevRepublicGIT

Nuxt3 has moved into public beta, so perhaps the Amplify team can work on supporting Nuxt3. It'd be great to have SSR support by the time it's officially released 🤞🏻

aspearman avatar Oct 13 '21 10:10 aspearman

+1 especially with Next 3 released.

ixartz avatar Oct 13 '21 10:10 ixartz

+1

devravi avatar Oct 20 '21 10:10 devravi

+1

bcs-gbl avatar Oct 27 '21 13:10 bcs-gbl

+1 This will be really helpful when we don't have to handle anything manually except the push of the code so the deployment will be easy and scaling will be also handled automatically.

aavrug avatar Nov 23 '21 07:11 aavrug

Is there any news about this? :)

salv0 avatar Feb 01 '22 14:02 salv0

So excited to try this feature 👍

annymosse avatar Feb 21 '22 20:02 annymosse

+1

StefanV85 avatar Apr 26 '22 19:04 StefanV85

I might found a way to at least host a Nuxt 3 app via Lambda. Will further investigate and hopefully find a way to host it with Amplify, even it currently doesn't seem to be possible via Amplify Hosting. The creation of a custom Lambda function (in Amplify) might work based on my following solution. Last but not least I can't understand why it seems to be so difficult for the Amplify team to implement Nuxt 3 hosting feature. The community is waiting for ages now and other providers like Vercel are handling it with an awesome user experience instead. To be honest I'm very disappointed about what AWS is (or better is not) doing!

Here comes a possible workaround:

With Nuxt 3 running on Nitro you have the option to build it with deployment presets. It also has one for AWS Lambda called (yes, you guessed it): aws-lambda

  1. Run NITRO_PRESET=aws-lambda yarn build to generate a Lambda compatible version
  2. Zip content of your .output/server folder
  3. Create a new Lambda function (manually via AWS console) and activate function URL feature
  4. Upload your created ZIP file
  5. Click on the function URL displayed under your Lambda function ARN
  6. Et voila, your entire frontend app is server-side rendered on AWS including dynamic routes

Please let me know if you think this might be a temporary workaround to at least host Nuxt 3 apps serverless on AWS or if you have another solution. Cheers!

// Edit: Unfortunately it currently looks like CSS and other assets are not being loaded, even moved into the ZIP file from public directory. Will try to figure out why and keep you posted

bart avatar May 05 '22 22:05 bart

I was able to make SSR work by following this https://kodius.com/blog/nuxt-ssr-on-amplify/.

Batto1300 avatar Jun 11 '22 15:06 Batto1300

@Batto1300 This is not SSR. It's using the generate command which generates a static site. SSR means it is running a nodeJS instance in the background that handles requests and generates HTML on the server-side.

bart avatar Jun 13 '22 10:06 bart

any updates on this?? Would love to have!

cweachock avatar Jun 30 '22 17:06 cweachock

@bart @cweachock

Give this a look: https://github.com/nuxt/framework/issues/3586

And this repo: https://github.com/ffxsam/nuxt-sst

scalemaildev avatar Jul 04 '22 02:07 scalemaildev

Thanks for pointing this out @scalemaildev but unfortunately it doesn't solve the main issue: AWS still doesn't support AWS out of the box whereas other cloud service providers like Vercel do. That's an issue just AWS can solve and they promised it for months now. I accepted that they give a sh*t on Nuxt 3 community and switched to Vercel and Firebase / Supabase with most of my projects.

bart avatar Jul 04 '22 21:07 bart

Thanks for pointing this out @scalemaildev but unfortunately it doesn't solve the main issue: AWS still doesn't support AWS out of the box whereas other cloud service providers like Vercel do. That's an issue just AWS can solve and they promised it for months now. I accepted that they give a sh*t on Nuxt 3 community and switched to Vercel and Firebase / Supabase with most of my projects.

Of Vercel/Firebase/Supabase which would you recommend for someone that wants to run a Nuxt3 app "on the edge"? Specifically, a multiplayer game app with a lot of back and forth between client and server?

scalemaildev avatar Jul 06 '22 06:07 scalemaildev

@scalemaildev Depends a little on what your server exactly does. If it ist just handling requests and for example generates timestamps Vercel is fine. If you have data that needs to get stored into a database and if you have a more complex app ecosystem I would recommend Firebase which is closer to AWS.

bart avatar Jul 06 '22 11:07 bart

Will we ever see this implemented? 👀

salv0 avatar Aug 16 '22 07:08 salv0

Unfortunately I don't think so. That's why I switched from Nuxt to Vitesse

bart avatar Aug 24 '22 23:08 bart