Last active
January 5, 2025 14:59
-
-
Save dandv/f5128978e70895eff0f66f0557c2b863 to your computer and use it in GitHub Desktop.
recursiveDelete fails with "Error: 0 deletes failed. The last delete failed with"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { initializeApp, cert } from 'npm:firebase-admin/app'; | |
import { getFirestore } from 'npm:firebase-admin/firestore'; | |
const serviceAccount = 'service-account-key.json'; | |
initializeApp({ credential: cert(serviceAccount) }); | |
export const db = getFirestore('nonexistent'); | |
await db.recursiveDelete(db.collection('docs')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment