Server-Side Render Vue Apps with Nuxt.js (Server-side Rendering with JavaScript Frameworks)

Firebase · 70K views · 2018 · 17:24

Open on YouTube

Web developmentCloud, DevOps & reliabilitytutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the starting tutorial for deploying a Nuxt SSR app on Firebase, and then cite it when setup problems come up, often noting it is outdated.

Recommended by 2 people across 2 different months, 2018 to 2022.

What it is

A 17-minute episode from the Firebase channel's server-side rendering series showing how to set up a Nuxt.js Vue app with SSR. It walks through the build configuration and deploys it using Cloud Functions with Firebase Hosting as a CDN for low latency.

What people said

Recommends Gijo Varghese · 2018-02 · Stack Overflow · on “How would you setup Nuxt.js with Google Cloud Functions?”

Firebase recently created a tutorial for this. They use Google cloud functions to handle ssr and firebase hosting to host the static assets. Checkout: [this video]

Recommends Danyx · 2021-12 · Stack Overflow · on “Why is vue-splide not working with Nuxt2?”

Issue was caused by the configuration required for Firebase hosting if following Firebase's Server-Side Render Vue Apps with Nuxt.js video [this video] . By removing the line buildDir: '../functions/nuxt' in the nuxt.config.js file the project runs fine locally, however, in order to deploy to Firebase you have to: Replace publicPath: '/public/' with publicPath: '/' , both in src/nuxt.config.js , and functions/index.js . Run npm run build . Copy the contents of src/.nuxt to functions/nuxt . Copy the contents of src/.nuxt/dist/client and src/.nuxt/dist/server to public/ . For the moment I do not know if there's a way for vue-splide to work while building to the functions folder, as I already tried

Cites IMANULLAH · 2018-06 · Stack Overflow · on “Best Practice for Nuxt.js and Firebase Realtime Database”

I had tried and i found there are two options i dont have any solution for Firebase/Firestore on NUXT SSR mode for SSR mode... work for firestore and realtime database but it's not realtime processing you can fetch data on asyncData method in component or nutServerInit method on actions Vuex if you want realtime working like firestore you have to use SPA mode on nuxt but it's not good for SEO you can fetch data on asyncData method in component or nuxtClientInit method on actions Vuex [this video] above video not working for realtime processing but it work for SSR it was using ismorphicfetch for realtime database but not for Forestore deploying NUXT SSR on Cloud Function it need a little tweak Clo

Cites Chan Jing Hong · 2018-08 · Stack Overflow · on “VueJS with Nuxtjs Property or method is not defined on the instance but referenced during render”

I'm relatively new to VueJS, and I'm wondering what is happening here. Below is my code from following this tutorial on Server Side Rendering with Nuxtjs Firebase [this video] . But it outputs the following error when I did firebase serve . Can anyone explain to me what is wrong here? <template> <ul> <li v-for="fact in facts" :key="fact.text"> {{ fact.text }} </li> </ul> </template> <script> import fetch from 'isomorphic-fetch'; export default { async asyncData() { const response = await fetch(' [LINK] '); const facts = await response.json(); return facts; } } </script> error: [Vue warn]: Property or method "facts" is not defined on the instance but referenced during render. Make sure that this p

Cites Gregory Salinas · 2019-03 · Stack Overflow · on “Nuxt ^2.0.0 and Firebase Hosting”

I am attempting to deploy my nuxt application to firebase hosting. I am currently following this tutorial [this video] which has helped me deploy the app to the firebase cloud i.e. the generated local host url: [LINK] ****/us-central1/testApp However, when I view the application in my localhost 5000 or the cloud local host 5001 the app is broken. localhost:5000 [LINK] localhost: 5001 [LINK] The tutorial mentioned is scaffold with Vue cli and I created my project with the npx create-nuxt-app . Also, assuming that the tutorial uses Nuxt version 1, which has a different dist output, I am using version 2 which outputs a dist directory with two folders client and server . I believe the issue has to be

Cites Julian Le Calvez · 2019-06 · Stack Overflow · on “Deploy a SSR Nuxt 2 application on firebase”

I have some troubles deploying a Nuxt 2.4 application on Firebase. I tried these 2 tutorials but they seem outdated: [this video] [LINK] With the first tutorial, I could make my app working on local (after few hours and with a lot of modifications for babel integration) but I never could serve or deploy it. I thought the tutorial was old and manipulations can't be exactly done like the guy did. With the second tutorial, I cloned the repository to try to deploy the example. I had to change 2 things : install Node 8 instead of Node 10 and upgrading firebase-admin to the last version in prod/server dir. Here is what I got: npm run setup is ok npm run dev is ok and the project works fine npm run buil

Cites Bhargav Konkathi · 2021-06 · Stack Overflow · on “Firebase server side rending example for nuxt.js”

I have created small nuxtjs app using firebase. I'm having hard time setting up nuxtjs build with firebase cloud function. I found this video but it is outdated ( [this video] ). Any help or guidance or documentation would be helpful. Here is link for the repo which. Also I mentioned steps which I tried to follow. [LINK] Here are the things that I've tried with this repo: 1. Install dependencies inside src using yarn install 2. Install dependencies in functions folder 3. Run yarn build inside src it will create nuxt folder inside folder. 4. Copy and move all contents from functions/nuxt/dist/client folder to public/client folder. 5. Now run functions serve --only functions,hosting -p 5004 6. You

Cites Danyx · 2022-05 · Stack Overflow · on “Set css route for nested routes in Nuxt”

I have a Nuxt site deployed on Firebase roughly following this video [this video] for SSR configuration, it works great when navigating to the homepage and then going to any other route, however when going directly to, say, /products/1 the HTML is rendered server-side just fine, but it's trying to load the css from /products/css/[hash].css . How can I set the route for these static files so that it always looks for them in '/', and not the subroute. I've looked over the Nuxt config documentation [LINK] and don't think I see an option to change that. My index.js on my functions folder is as follows, if that helps: const functions = require('firebase-functions'); const { Nuxt } = require('nuxt'); c