0
を見つけることができない私はここに私が現在使用しているコードだ、私のVue + LaravelアプリケーションでのIndexedDBを追加している:Dexie.jsのIndexedDBは、指定されたオブジェクト
export default {
mixins: [VueGoogleMap.MapElementMixin],
created() {
this.eventBus.$on("refresh-map",() => {
this.fetchHexagons();
});
const getAllBuildings =() => Vue.http.get("/sandbox/buildings");
getAllBuildings().then((result) => {
const async = Dexie.async;
const spawn = Dexie.spawn;
const db = new Dexie("buildings");
db.version(1).stores({
buildings: `++dexie_id, id, name, address, city, nr_units, lat, long, purchased`,
});
db.transaction("rw", db.buildings, function*() {
result.body.forEach(function*(el) {
const a = yield db.buildings.add({
id: el.id,
name: el.name,
address: el.address,
city: el.city,
nr_units: el.nr_units,
lat: el.lat,
long: el.long,
purchased: el.purchased,
});
});
console.log("done");
}).catch(function(err) {
// Catch any error event or exception and log it:
console.error(err.stack || err);
});
あなたが見ることができるように、私は」それらを高速に解析するために、(私はそれらを地図に表示する必要があります)、indexedDB内のすべての建物を転送するためにDBを照会します。問題は、私はこのコードを実行すると、私は次のエラーを取得することです:
CanvasOverlay.vue?e208:68 Error: Failed to execute 'transaction' on 'IDBDatabase': One of the specified object stores was not found.
at Transaction.create (dexie.es.js?f8d5:2900)
at eval (dexie.es.js?f8d5:2222)
at eval (dexie.es.js?f8d5:1343)
at callListener (dexie.es.js?f8d5:1026)
at endMicroTickScope (dexie.es.js?f8d5:1113)
at IDBOpenDBRequest.eval (dexie.es.js?f8d5:1180)
私がインストールされているパッケージのみがDexieです:
npm install --save dexie
私はもっと何かをインストールする必要はありますかそれはあるかもしれませんWebpackの問題?
、それは他の人に、より便利になりますので、あなたは、あなたの質問のタイトルを変更してくださいことはできますか?現在のところ、タイトルは非常に幅広いです。あなたの質問は、特にdexieの問題と、特定の種類のindexedDBエラーに関するものです。それらのことに言及してみてください。 – Josh