i'm trying to create a custom token for firebase in mi server
import * as admin from 'firebase-admin';
var serviceAccount = require('PATH_TO_CREDENTIALS');
console.log(serviceAccount);
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: "https://URL.firebaseio.com"
});
admin.auth().createCustomToken("some-uid").then(function(customToken){
console.log(customToken);
}
I follow all the steps in the documentation 1. https://firebase.google.com/docs/admin/setup
But i am getting an error: Property 'createCustomToken' does not exist
what can i do?