esm.sh
esm.sh copied to clipboard
Failed to import - ‘firebase’
Failing module
- GitHub: https://github.com/firebase/firebase-js-sdk
- npm: https://www.npmjs.com/package/firebase
import * as firebase from "https://esm.sh/firebase"
Error message
After running deno run I got this:
Uncaught (in promise) Error: Service firestore is not available
at c.getImmediate (https://esm.sh/@firebase/[email protected]/denonext/component.mjs:2:1313)
at Module.rf (https://esm.sh/@firebase/[email protected]/denonext/firestore.mjs:18:2994)
After checking esm link, I caught the message ‘module not found’.
Additional info
- Deno version:2.1.9
- firebase-admin is working.
i will look into it
use https://esm.sh/firebase/app instead, there is no main field in package.json of firebase
Got it. But the problem lies elsewhere….
error: Uncaught (in promise) Error: Service firestore is not available
at c.getImmediate (https://esm.sh/@firebase/[email protected]/denonext/component.mjs:2:1313)
at Module.rf (https://esm.sh/@firebase/[email protected]/denonext/firestore.mjs:18:2994)
This error occurs when running initializeapp.