We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: Deno 2.2.5
I've been playing around with Deno and Firebase/Firestore, put together a short script:
import "https://deno.land/x/[email protected]/mod.ts"; import { deleteApp, initializeApp } from "npm:firebase/app"; import { collection, getDocs, getFirestore } from "npm:firebase/firestore"; const firebaseConfig = JSON.parse(Deno.env.get("FIREBASE_CONFIG")); const firebaseApp = initializeApp(firebaseConfig); const db = getFirestore(firebaseApp); (await getDocs(collection(db, "sample-collection"))).docs.forEach((doc) => { console.log(doc.data()); }); await deleteApp(firebaseApp);
which, if I run (locally or in docker container), I get the following:
export FIREBASE_CONFIG='<CONFIG>' && deno run --node-modules-dir --allow-scripts=npm:@firebase/[email protected],npm:[email protected] --allow-env --allow-net test.js { "sample-field": "sample-value" } error: Uncaught (in promise) Error: stream closed because of a broken pipe at async node:http2:824:44
now if I change the imports to esm.sh ones, the issue with broken pipe goes away:
import "https://deno.land/x/[email protected]/mod.ts"; import { deleteApp, initializeApp } from "https://esm.sh/[email protected]/app"; import { collection, getDocs, getFirestore } from "https://esm.sh/[email protected]/firestore"; const firebaseConfig = JSON.parse(Deno.env.get("FIREBASE_CONFIG")); const firebaseApp = initializeApp(firebaseConfig); const db = getFirestore(firebaseApp); (await getDocs(collection(db, "sample-collection"))).docs.forEach((doc) => { console.log(doc.data()); }); await deleteApp(firebaseApp);
the output is:
export FIREBASE_CONFIG='<CONFIG>' && deno run --allow-env --allow-net test.js { "sample-field": "sample-value" }
(no broken pipe, the exit status is 0)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version: Deno 2.2.5
I've been playing around with Deno and Firebase/Firestore, put together a short script:
which, if I run (locally or in docker container), I get the following:
now if I change the imports to esm.sh ones, the issue with broken pipe goes away:
the output is:
(no broken pipe, the exit status is 0)
The text was updated successfully, but these errors were encountered: