嗨,我正试图在我的网站上实现firebase实时数据库API,我遵循以下文档:https://firebase.google.com/docs/database/admin/save-data#node.js,但是我得到了这个错误:

这是我的密码:
<script type="module">
// Import the functions you need from the SDKs you need
import { initializeApp } from "https://www.gstatic.com/firebasejs/9.8.3/firebase-app.js";
import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.8.3/firebase-analytics.js";
import { getDatabase } from "https://www.gstatic.com/firebasejs/9.8.3/firebase-database.js";;
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = {
apiKey: "xxxxxxxxxxxxxxxxxxxxx",
authDomain: "xx.x.xxx",
databaseURL: "xxxxxxxxxxxxxxxx",
projectId: "xxxxx",
storageBucket: "xxxxxxxxx",
messagingSenderId: "xxxx",
appId: "xxxxx",
measurementId: "xxxxxxx"
};
const fireapp = initializeApp(firebaseConfig);
const db = getDatabase(fireapp);
const ref = db.ref('server/saving-data/fireblog');
</script>我做错了什么?我使用的版本是否不正确?
https://stackoverflow.com/questions/72605869
复制相似问题