Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when initializing db #105

Open
cutterbl opened this issue Sep 28, 2018 · 4 comments
Open

Error when initializing db #105

cutterbl opened this issue Sep 28, 2018 · 4 comments

Comments

@cutterbl
Copy link

So I followed the docs

import LinvoDB from 'linvodb3';
import Level from 'level-js'; // had to this way due to my build process

LinvoDB.defaults.store = { db: Level };
LinvoDB.dbPath = dirname(remote.getGlobal('sharedStorage').dbPath);
const db = new LinvoDB('songlibrary', {}, {});

And what happens is I get a js error out of LevelUP when it's trying to setup the readStream

Uncaught TypeError: Cannot read property 'bind' of undefined
at new ReadStream (index.js:16)
at LevelUP../node_modules/linvodb3/node_modules/levelup/lib/levelup.js.LevelUP.readStream.LevelUP.createReadStream (levelup.js:274)
at Function../node_modules/linvodb3/lib/model.js.Model.buildIndexes (model.js:119)
at bagpipe.js:157

@rijnhard
Copy link

@cutterbl did you figure this out? I may end up going this route because the app I want to use this in is going to be built and packaged for multiple environments.

@cutterbl
Copy link
Author

@rijnhard No, I never did.

@Ivshti
Copy link
Owner

Ivshti commented Jun 17, 2019

the supported version of level-js is 2.x; do you have that version?

@cutterbl
Copy link
Author

@lvshti Honestly, I stopped working that project months ago, Don't remember what we did, just know it was a different direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants