Closed
Description
Describe your environment
- Firebase SDK version: 8.3.0
- Firebase Product: firebase admin
- Node.js version: 10.16.0
- NPM version: 6.10.3
Describe the problem
When initialising firebase admin with standard downloaded service account json, typescript error incompatible types when "resolveJsonModule": true,
in compiler
Relevant Code:
import * as admin from 'firebase-admin';
import * as serviceAccount from "path/to/serviceAccountKey.json";
admin.initializeApp({
credential: admin.credential.cert(serviceAccount), // <---- type error here
databaseURL: "https://<DATABASE>.firebaseio.com"
});
tsconfig.json
"compilerOptions": {
(...),
"resolveJsonModule": true,
},