SSR Deployment with Now
-
Hi,
I created a sample project with quasar create <pr>, and locally all is perfect. Now, I’m trying to learn how to do a simple SSR or even SPA deployment, by following the instructions, but once deployed I get errors, and no luck to get application going.The error:
502 Type: NO_STATUS_CODE_FROM_LAMBDA The Lambda responsible for the path you tried to access did not reply with a status code.
Does anyone have a sample of now.json or some advice what am I doing wrong?
My now.json:
{ "version": 2, "builds": [ { "src": "index.js", "use": "@now/node" } ], "routes": [{ "src": "/", "dest": "index.js" }] }
Thanks
-
Use “Now” version 1 deployment.
-
Thanks Razvan, still complains, but maybe because I installed the latest version of “Now”:
> Error! You tried to create a Now 1.0 deployment. Please use Now 2.0 instead: https://zeit.co/upgrade
Is there maybe a sample of deploying directly to AWS through Serverless?
Thanks
-
I’m having the same problem when trying to deploy
-
@racingfox just to put this to rest: the docs website itself is Quasar SSR using Now 1.0
@patryckx these are errors from your app. Have you checked the SSR build before deploying?
-
This post is deleted! -
It is no longer possible to use the now v1, is blocked for new users.
https://github.com/zeit/now-cli/issues/1805
https://spectrum.chat/zeit/now/deploy-v1~5d1def00-3504-4618-9ef4-40d64e69f573
-
This is how to make Zeit Now work with Quasar
- Log into Zeit Now https://zeit.co/
- Create a project or import project from Github etc.
- Go into Build & Development Settings
If SPA mode
Add the following build command: quasar build
Add the following output directory if SPA: /dist/spaIf PWA mode
Add build command: quasar build --mode pwa
Add the following output directory: /dist/pwaIf SSR mode
Add build command: quasar build --mode ssr
Add the following output directory: /dist/ssrIf SSR + PWA mode
Add build command: quasar build --mode ssr & quasar build --mode pwa
Add the following output directory: /dist/ssrPress save when done.
- That’s it! You may now try to deploy your project to Zeit Now, and it should work
In order to support SPA routing in the deployed app, consider adding now.json file in your root folder:
{
“routes”: [
{ “handle”: “filesystem” },
{ “src”: “/.*”, “dest”: “/index.html” }
]
}