I am trying to use PouchDB with node-webkit. Which inturn is a node_module. What I could understand so far is that node-gyp is probably not compatible, trying to load the 3rd party node_modules(PouchDB).
note: I am also using nodejs virtualenv for node-webkit.
when I use var PouchDB = require('pouchdb'); in the script the following error is thrown.
Error: /home/manjunath/node/node_modules/pouchdb/node_modules/leveldown/build/Release/leveldown.node: undefined symbol: _ZN2v811HandleScopeC1Ev at Error (native) at Module.load (module.js:352:32) at Function.Module._load (module.js:308:12) at Module.require (module.js:360:17) at require (module.js:376:17) at bindings (/home/manjunath/node/node_modules/pouchdb/node_modules/leveldown/node_modules/bindings/bindings.js:76:44) at Object. (/home/manjunath/node/node_modules/pouchdb/node_modules/leveldown/index.js:1:99) at Module._compile (module.js:452:26) at Object.Module._extensions..js (module.js:470:10) at Module.load (module.js:352:32) at Function.Module._load (module.js:308:12)
I find no way out of this, please help me !
PouchDB is actually really flexible when you're using node-webkit. Rather than using nw-gyp and all that jazz to get LevelDB running on the Node side of things, you can actually just include PouchDB in a <script> tag (as if you were writing a browser app) and it will use IndexedDB instead. (WebSQL is also available, if you want.)
You will probably have a much easier time with this solution than with the Node-style (i.e. LevelDB) solution. Just my hunch.