You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run a simple script in Deno to add data to Firestore, I tried the stable version of the SDK but it doesn't work because it relies on XMLHttpRequest doesn't support (our problem, not Firebase's). I then tried version 9 in beta but Skypack is erroring out with this error message:
Download https://cdn.skypack.dev/[email protected]/app?dist=es2017&dts
Download https://cdn.skypack.dev/[email protected]/firestore?dist=es2017&dts
Download https://cdn.skypack.dev/new/[email protected]/dist=es2017/app
Download https://cdn.skypack.dev/new/[email protected]/dist=es2017/firestore
Download https://cdn.skypack.dev/error/build:[email protected]
Download https://cdn.skypack.dev/error/build:[email protected]
[Package Error] "[email protected]" could not be built.
[1/5] Verifying package is valid…
[2/5] Installing dependencies from npm…
[3/5] Building package using esinstall…
Running esinstall...
@rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
ENOENT: no such file or directory, open 'firebase/compat/installations/dist/index.esm.js'
ENOENT: no such file or directory, open '/tmp/cdn/_8cD1Qp4U3uEeSjoy6Fo6/node_modules/firebase/compat/installations/dist/index.esm.js'
error: Uncaught Error: [Package Error] "[email protected]" could not be built.
at https://cdn.skypack.dev/error/build:[email protected]:19:7
Steps to reproduce:
Here's the full repro in Deno:
// deno run --no-check this.tsimportfirebasefrom"https://cdn.skypack.dev/[email protected]/app?dist=es2017&dts";import"https://cdn.skypack.dev/[email protected]/firestore?dist=es2017&dts";firebase.initializeApp({apiKey: "***********************************",authDomain: "*******.firebaseapp.com",projectId: "**********",storageBucket: "***********.appspot.com",messagingSenderId: "**********************",appId: "1:************:web:***************************"});constdb=firebase.firestore();try{constdocRef=awaitdb.collection("test").add({ts: newDate().toISOString(),});console.log(`successfully added record ${docRef.id}`);}catch(err){console.error(err)}
The text was updated successfully, but these errors were encountered:
I think I know what is causing the error. We need to remove this block in package.json.
Put this compiling error aside, you'll have to rewrite your code in order to use v9. v9 is a total revamp of the SDK, and has a very different API. You need to import individual functions instead of a single firebase object. You can check out our upgrade guide and the reference docs.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
I'm trying to run a simple script in Deno to add data to Firestore, I tried the stable version of the SDK but it doesn't work because it relies on
XMLHttpRequest
doesn't support (our problem, not Firebase's). I then tried version 9 in beta but Skypack is erroring out with this error message:Steps to reproduce:
Here's the full repro in Deno:
The text was updated successfully, but these errors were encountered: