Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

where to find pattern module

where to find pattern module

Problem

I want to try this Module https://github.com/creationix/nstore fore simple storage . But when i run this code :

// Load the library
var nStore = require('nstore');
// Create a store
var users = nStore.new('data/users.db', function () {
  // It's loaded now
});

It gives me this error .

     node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: Cannot find module 'pattern'
    at Function._resolveFilename (module.js:326:11)
    at Function._load (module.js:271:25)
    at require (module.js:355:19)
    at Object. (/var/www/rahulutils/node_modules/nstore/nstore.js:4:15)
    at Module._compile (module.js:411:26)
    at Object..js (module.js:417:10)
    at Module.load (module.js:343:31)
    at Function._load (module.js:302:12)
    at require (module.js:355:19)
    at Object. (/var/www/rahulutils/testnstore.js:2:14)

where can i find this pattern module.

OR

any other simple key value database i can use pls suggest.

Problem courtesy of: XMen

Solution

nstore usess 'pattern' package from NPM. look at "dependencies":

https://github.com/creationix/nstore/blob/master/package.json

It should install with nstore (if you used Npm Install nstore) If you checkout project from github you have to do:

npm install pattern

npm install step

and that's it.

Solution courtesy of: Tereska

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

where to find pattern module

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×