I am writing some server side code in my angular application.
For that I need firbase-admin. I am following the steps from the official website here
for firebase-admin installation. After that I wrote
import * as admin from 'firebase-admin';
async function authenticateWithFirebase(email: string, password: string) {
// Authenticate with Firebase Admin SDK
const user = await admin.auth().getUserByEmail(email);
// Generate a custom token for the authenticated user
const token = await admin.auth().createCustomToken(user.uid);
return token;
}
Once I write this and compile I start getting the following error
I am still not able to know why this is happening and how to deal with this. Please help
FYI i am using Angular CLI: 16.2.1 and
Node: 18.18.2