[Vuejs]-Firebase admin SDK + Vue + Webpack,TypeError: rtdb.initStandalone is not a function

4👍

You seem to be trying to use the Firebase Admin SDK in a vue.js web app. The vue code runs in the browser, not in the server.

From the getting started with the Admin SDK page: “The Admin SDK lets you interact with Firebase from privileged environments…” A web app is not a privileged environment: if you put your service account into a web page, you’re exposing your administrative credentials to all users of that web app.

You’ll instead want to use the regular Web SDK of Firebase, as shown here: https://firebase.google.com/docs/web/setup

0👍

you can use npm install firebase instead of npm install firebase-admin. This package can very useful.

Leave a comment