Is it possible to use firebase-admin with deno?
i have tried to use this https://www.skypack.dev/view/firebase-admin but it didn't work.
It fails with an error something like eof.
i use playground by the way.
#Firebase Admin With Deno
17 messages · Page 1 of 1 (latest)
Does it work if you import from an npm url: import { initializeApp } from "npm:firebase-admin/app";?
I'll try inshaAllah
But without /app it didn't work i guess
The default import seems to work as well this way import firebaseAdmin from "npm:firebase-admin";
it gives me module not found
i use playground, might that be the issue?
Ahh maybe so, I am using VS Code
Maybe playground has some limitations
My next move is to have deno on local inshaAllah
Thanks a lot
error: Uncaught Error: Not implemented: crypto.Sign
throw new Error(message);
^
at notImplemented (https://deno.land/std@0.166.0/node/_utils.ts:23:9)
at new Sign (https://deno.land/std@0.166.0/node/internal/crypto/sig.ts:45:5)
at Object.createSign (https://deno.land/std@0.166.0/node/crypto.ts:268:10)
at Object.sign (file:///root/.cache/deno/npm/registry.npmjs.org/jwa/1.4.1/index.js:151:25)
at Object.jwsSign [as sign] (file:///root/.cache/deno/npm/registry.npmjs.org/jws/3.2.2/lib/sign-stream.js:32:24)
at Object.module.exports [as sign] (file:///root/.cache/deno/npm/registry.npmjs.org/jsonwebtoken/8.5.1/sign.js:204:16)
at ServiceAccountCredential.createAuthJwt_ (file:///root/.cache/deno/npm/registry.npmjs.org/firebase-admin/11.3.0/lib/app/credential-internal.js:105:20)
at ServiceAccountCredential.getAccessToken (file:///root/.cache/deno/npm/registry.npmjs.org/firebase-admin/11.3.0/lib/app/credential-internal.js:77:28)
at FirebaseAppInternals.refreshToken (file:///root/.cache/deno/npm/registry.npmjs.org/firebase-admin/11.3.0/lib/app/firebase-app.js:45:49)
at FirebaseAppInternals.getToken (file:///root/.cache/deno/npm/registry.npmjs.org/firebase-admin/11.3.0/lib/app/firebase-app.js:37:25)
i continously get this error
i tried different modules
different package versions
none of them worked out
I recommend you use firebase js sdk.
It worked for me.