0

早上好,我刚开始看到Se。我的目标是使用 Vue 创建一个应用程序来从 firestore 读取数据。我在 main.js 中初始化了 firestore,但是当我启动应用程序时,它给了我以下错误 enter image description here

这是我的 main.js

import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')

const Firestore = require('@google-cloud/firestore');

const db = new Firestore({
  projectId: 'myfiresite-88939',
  keyFilename: 'c:/Users/emanu/Documents/myfiresite-88939-ab83a8f33460.json',
});

const docRef = db.collection('users').doc('alovelace');

docRef.set({
  first: 'Ada',
  last: 'Lovelace',
  born: 1815
});

我不知道我错在哪里,你能帮我吗?

4

0 回答 0