[NPM] Installing indexedDB promise

I can’t create indexedDB after adding it dependency to package.json. Link to the library i want to use

How are you trying to use it, with Rollup/Webpack or directly in the front-end?

Directly through package.json

What problem are you running into? What did you expect to happen, and what happened instead?

I am trying to use it my project on https://glitch.com/edit/#!/cool-eyebrow?path=js/idb-test/index.js:1:0 then create an indexDB database with
import idb from ‘idb’;

idb.open(‘keyval-store’, 1, upgradeDB => {
upgradeDB.createObjectStore(‘keyval’);
});

It looks like you’re getting there. One thing, since you’re including it in package.json - you can then reference the idb.js file if you make it accessible with Express e.g. https://glitch.com/edit/#!/dark-double?path=server.js:13:6

Thanks a bunch its working now

1 Like

ah, it was working but I think something must have been cached. Try now.