You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a lot of issues setting up the librairy so I tested ou the basic example.
varLinvoDB=require("linvodb3");// The following two lines are very important// Initialize the default store to Medeadown - which is a JS-only store which will work without recompiling in NW.js / ElectronLinvoDB.defaults.store={db: require("medeadown")};// Comment out to use LevelDB instead of Medea// Set dbPath - this should be done explicitly and will be the dir where each model's store is savedLinvoDB.dbPath=process.cwd();varDoc=newLinvoDB("doc",{/* schema, can be empty */})vard=newDoc();d.name="test";d.saved=newDate();d.save(function(){console.log("saved document with _id: "+d._id);Doc.count({},function(err,n){console.log("document count "+n)});});
.\node_modules\levelup\lib\levelup.js:53
throw error
^
InitializationError: First argument must be an abstract-leveldown compliant store
at new LevelUP (.\node_modules\levelup\lib\levelup.js:49:13)
at LevelUP (.\node_modules\levelup\lib\levelup.js:33:12)
at Function.Model.initStore (.\node_modules\linvodb3\lib\model.js:79:100)
at new Model (.\node_modules\linvodb3\lib\model.js:52:35)
at Object.<anonymous> (.\index.js:9:11)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
What am I doing wrong ?
The text was updated successfully, but these errors were encountered:
Granipouss
changed the title
[bug] Basic example
[bug] Basic example - NPM version issue
Aug 29, 2018
Apparently the version that I downloaded from NPM (the 3.25.2) does not have the same code as in the repo. It does not use encode-down for instance.
It works fine when I download for the git reposotory
Hi,
I had a lot of issues setting up the librairy so I tested ou the basic example.
with the following
package.json
And I have the following error:
What am I doing wrong ?
The text was updated successfully, but these errors were encountered: